# react-demo **Repository Path**: kangshuolei/react-demo ## Basic Information - **Project Name**: react-demo - **Description**: 这个项目是我平时遇到的问题和测试的一些代码 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 2 - **Forks**: 0 - **Created**: 2021-08-13 - **Last Updated**: 2023-05-14 ## Categories & Tags **Categories**: Uncategorized **Tags**: React, hooks, Axios, Mock ## README 1. import Deom1 from "./demo1" //该实例为canvans的使用实例 2. import Demo2 from "./demo2" //该实例为useContext和antd的Tree实例的应用(用途不大,用来测试的) 3. import Demo3 from "./demo3" //该实例是修改antd的table自定义样式(scss使用) 4. import Demo4 from "./demo4" //该实例为antd Tree组件的过滤检索功能(用途也不大) 5. import Demo5 from "./demo5" //该实例为使用 Mock 来实现table的增删改查功能 6. import Demo6 from "./demo6" //该实例是高阶组件的实现方法 7. import Demo7 from "./demo7" //该实例为父组件重新渲染,子组件也跟着重新渲染 8. import DemoMemo from "./demo7/memo/memo" //该实例为memo的解决方法 9. import UseCallback from "./demo7/useCallback/useCallback" //该实例为useCallback 的解决办法 10. import UseMemo from "./demo7/useMemo/useMemo" //该实例为useCallback 的解决办法 11. import Demo8 from "./demo8" //该实例是验证useState的实时更新方法(不是很完善) 12. import Demo9 from "./demo9" //该实例是实现用useContext实现跨组件传值 13. import Demo10 from "./demo10" //该实例是利用回调函数来实现子组件向父组件传值 14. import Demo11 from "./demo11" //该实例是实现一个自定义Hooks 15. import Debounce from "./demo12/debounce" //该实例是实现防抖函数的自定义Hooks 16. import Throttle from "./demo12/throttle" //该实例是实现节流函数的自定义Hooks # Getting Started with Create React App This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). ## Available Scripts In the project directory, you can run: ### `yarn start` Runs the app in the development mode.\ Open [http://localhost:3000](http://localhost:3000) to view it in the browser. The page will reload if you make edits.\ You will also see any lint errors in the console. ### `yarn test` Launches the test runner in the interactive watch mode.\ See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. ### `yarn build` Builds the app for production to the `build` folder.\ It correctly bundles React in production mode and optimizes the build for the best performance. The build is minified and the filenames include the hashes.\ Your app is ready to be deployed! See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. ### `yarn eject` **Note: this is a one-way operation. Once you `eject`, you can’t go back!** If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own. You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it. ## Learn More You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). To learn React, check out the [React documentation](https://reactjs.org/). ### Code Splitting This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting) ### Analyzing the Bundle Size This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size) ### Making a Progressive Web App This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app) ### Advanced Configuration This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration) ### Deployment This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment) ### `yarn build` fails to minify This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify) ``` 这里输入代码 ```