-
版本:
useState
-
版本:
useContext
-
版本:
custom hook
-
版本:
Best Practice
https://react.dev/reference/react/createContext#createcontext
https://pjchender.dev/react/react-context-provider-api/#-usecontext-best-practice
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
Currently, two official plugins are available:
- @vitejs/plugin-react uses Babel for Fast Refresh
- @vitejs/plugin-react-swc uses SWC for Fast Refresh