Skip to content

Commit

Permalink
Merge pull request #146 from W01fw00d/patch-1
Browse files Browse the repository at this point in the history
Update state-management.md old React documentation links
  • Loading branch information
alan2207 committed Feb 15, 2024
2 parents ab9f559 + fddd12c commit d0cae77
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/state-management.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ There is no need to keep all of your state in a single centralized store. There

This is the state that only a component needs, and it is not meant to be shared anywhere else. But you can pass it as prop to children components if needed. Most of the time, you want to start from here and lift the state up if needed elsewhere. For this type of state, you will usually need:

- [useState](https://reactjs.org/docs/hooks-reference.html#usestate) - for simpler states that are independent
- [useReducer](https://reactjs.org/docs/hooks-reference.html#usereducer) - for more complex states where on a single action you want to update several pieces of state
- [useState](https://react.dev/reference/react/useState) - for simpler states that are independent
- [useReducer](https://react.dev/reference/react/useReducer) - for more complex states where on a single action you want to update several pieces of state

[Component State Example Code](../src/components/Layout/MainLayout.tsx)

Expand All @@ -17,7 +17,7 @@ This is the state that controls interactive parts of an application. Opening mod

Good Application State Solutions:

- [context](https://reactjs.org/docs/context.html) + [hooks](https://reactjs.org/docs/hooks-intro.html)
- [context](https://react.dev/learn/passing-data-deeply-with-context) + [hooks](https://react.dev/reference/react-dom/hooks)
- [redux](https://redux.js.org/) + [redux toolkit](https://redux-toolkit.js.org/)
- [mobx](https://mobx.js.org)
- [zustand](https://github.com/pmndrs/zustand)
Expand Down

0 comments on commit d0cae77

Please sign in to comment.