This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
Its a practice for useEffect, useState : To use the useState Hook, we first need to import into our component. Notice that we are destructuring useState from react as it is a named export.
Currently, two official plugins are available:
- @vitejs/plugin-react uses Babel for Fast Refresh
- @vitejs/plugin-react-swc uses SWC for Fast Refresh