Skip to content
This repository has been archived by the owner on Jan 26, 2020. It is now read-only.

redux store provider initiated before page component #47

Closed
alidcast opened this issue Jul 10, 2018 · 0 comments
Closed

redux store provider initiated before page component #47

alidcast opened this issue Jul 10, 2018 · 0 comments

Comments

@alidcast
Copy link
Owner

alidcast commented Jul 10, 2018

Right now we walk component tree and call getInitialProps per component

The problem for redux is that getInitialProps is called before App/Page components, so its doing nothing for ssr the store

Few ideas:

  • add a function like nuxtjs does for ssr logic that the store should handle (not ideal)
  • different methods to call before and post walking tree (not ideal)
  • I considered changing way hocs work such that they wrap one another (better but then store would only work for App.js and not Pages)

I guess it goes back to #42 - if pages don't need to query server data nor handle redirects what do pages need getInitialProps for?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant