Skip to content
This repository has been archived by the owner on Oct 9, 2024. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant