- In React, when a state changes, all the components using their states are rerendered. This is not necessary in cases which the component is not using that specific data.
- The context is using a
useRef
to store and change the value in provider, and theuseSelector
hook inlib/useSelector.tsx
is using auseState
being instancied in each component with the respective value being used in that component, managed by thelistenerId
, using and updating the values from theuseRef
of the Context Api. - This strategy is based in Redux and Zustand.
- Install LTS Node version.
- React (Vite)
- Typescript
- React hooks
git clone https://github.com/RodrigoRVSN/zoro.git
yarn
yarn dev
To contribue with zoro, follow the steps:
- Fork this repository.
- Create a branch:
git checkout -b <name_branch>
. - Make the changes and confirm:
git commit -m '<message_commit>'
- Send to original repository:
git push origin <main_branch> / <local>
- Send the pull request.
Alternatively, see the GitHub documentation at how to create a pull request.
Made with ❤️ by:
Rodrigo Victor |