Skip to content

⚔️ My Client Management Tool for React without dependencies

Notifications You must be signed in to change notification settings

RodrigoRVSN/zoro

Repository files navigation

zoro

Why Context Api using a state (useState) is bad for Client State Management?

  • 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.

What strategy is being use instead a state?

  • The context is using a useRef to store and change the value in provider, and the useSelector hook in lib/useSelector.tsx is using a useState being instancied in each component with the respective value being used in that component, managed by the listenerId, using and updating the values from the useRef of the Context Api.
  • This strategy is based in Redux and Zustand.

💻 Prerequisites

  • Install LTS Node version.

🛠 Tools used

  • React (Vite)
  • Typescript
  • React hooks

🚀 Installing zoro

Clone repository

  git clone https://github.com/RodrigoRVSN/zoro.git

Install dependencies

  yarn

Run app

  yarn dev

📫 Contribuiting with zoro

To contribue with zoro, follow the steps:

  1. Fork this repository.
  2. Create a branch: git checkout -b <name_branch>.
  3. Make the changes and confirm: git commit -m '<message_commit>'
  4. Send to original repository: git push origin <main_branch> / <local>
  5. Send the pull request.

Alternatively, see the GitHub documentation at how to create a pull request.


🤝 Contributors

Made with ❤️ by:

Foto do Rodrigo Victor no GitHub
Rodrigo Victor

About

⚔️ My Client Management Tool for React without dependencies

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published