salvoravida / redux-first-history

Redux history binding support react-router - @reach/router - wouter - react-location
https://wvst19.csb.app/
MIT License
446 stars 34 forks source link

What about Server Side Rendering? #77

Closed talkohavy closed 2 years ago

talkohavy commented 2 years ago

Is it possible / will it be possible in the future to use redux-first-history in server side render? (and how would you do it?)

Right now you have createBrowserHistory(), but as you know, on the server doesn't have a DOM, so it gives the natural error of: Error: Invariant failed: Browser history needs a DOM

salvoravida commented 2 years ago

you should replace createBrowserHistory with createMemoryHistory if is SSR