Aliases :
- @components
- @routes
- @styles
- @src
Dependencies installed:
- R3F
- Drei
- Post-processing
- Leva
- GSAP
- Framer-motion
- React router dom
- Valtio
- React Powerglitch
To use state management:
- Add the global variable to the state.js file in the components folder.
- Import the state and useSnapshot in the folder you need to use it in.
- You can use
import state from "@components/state";
- Use state variable to update the proxy state and snap to render and update it
- Use subscribe if you want some function to run on reactivity to some particular state