fridays / next-routes

Universal dynamic routes for Next.js
MIT License
2.47k stars 230 forks source link

Redux state is lost when using /page/:slug #220

Closed jan0991 closed 6 years ago

jan0991 commented 6 years ago

I am using next-redux-wrapper and it preserves state fine as long as I am switching between same level pages. For example:

domain.com -> domain.com/profile domain.com/profile -> domain.com/some-other-page

However, state get's lost(redux re-creates new store) when I do: domain.com -> domain.com/profile/:slug

vaibhav-kona commented 5 years ago

This is happening for all pages to me. With browser back and forth, the state gets reset. Can you tell how you solved this issue ?

Page A : screenshot 2018-12-05 at 4 06 59 pm

Page B : screenshot 2018-12-05 at 4 07 06 pm

kodelio commented 5 years ago

@jan0991 did you solve the problem ? If yes, how ? Thank you

VadyaVL commented 5 years ago

@jan0991 Hello. I have some trouble. Can you show way to fix it? Thanks.

VadyaVL commented 5 years ago

@kokno check using Link from '.../routes' or 'next/link',

haquezameer commented 5 years ago

@kokno @VadyaVL how did you guys fix this issue?

fhuyghe commented 5 years ago

I'm running into the same issue although I am not using Redux. Does anyone have a solution for this?