Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove redux in favour of React context #161

Open
robbieaverill opened this issue Nov 24, 2020 · 0 comments
Open

Remove redux in favour of React context #161

robbieaverill opened this issue Nov 24, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@robbieaverill
Copy link
Contributor

We probably don't need to use Redux anymore, we can use the React context API instead.

Next.js have an official example of how to use Redux in Next: https://github.com/vercel/next.js/tree/canary/examples/with-redux

Objectives:

  • Server side logic (if applicable) only fetches data that it needs for that request, since "On the server side every request initializes a new store, because otherwise different user data can be mixed up. On the client side the same store is used, even between page changes.
  • Client side pages share state and do not need to re-fetch user information, cart, etc unless they explicit want to do so
  • Statically generated pages work
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant