cerebral / overmind

Overmind - Frictionless state management
https://overmindjs.org
MIT License
1.58k stars 95 forks source link

Page doesn't re-render after navigation in Next 13 #567

Closed sergeyzwezdin closed 1 year ago

sergeyzwezdin commented 1 year ago

Steps to reproduce:

  1. Repo: https://github.com/sergeyzwezdin/nextjs-overmind/tree/master/nextjs-overmind-test
  2. Run the app (npm run dev)
  3. Open how page, trigger state change - the page reflects the changes
  4. Navigate to another page, then navigate back
  5. Try to trigger state change -> state is changed, but page is not going to be re-rendered
  6. Once I trigger re-render manually, it appears to work again.

Here is the video how it looks like: 2022-11-08 at 19 09 21

sergeyzwezdin commented 1 year ago

Confirmed: Issue appears after migrating to React 18.

henri-hulski commented 1 year ago

Confirmed: Issue appears after migrating to React 18.

Did you try out the React 18 fix from Christian in #560?

sergeyzwezdin commented 1 year ago

@henri-hulski not yet, how to do that?

Othman2001 commented 1 year ago

@sergeyzwezdin did you found any solutiion i have similar problem , i have createed next app and counter state when i click in incrment button it doesn't re render the app ?

henri-hulski commented 1 year ago

Actually the fix was published a few days ago in next. Try to install next and it should work.

grandevel commented 1 year ago

next is currently broken due to dependbot fun on my part - I'll be fixing it up tonight/tomorrow. Then give it a try.

Othman2001 commented 1 year ago

@grandevel Hey Dan did you manage to fix it ?

marcofugaro commented 1 year ago

@grandevel @christianalfoni could we do another release with https://github.com/cerebral/overmind/pull/560? Confirmed overmind doesn't currently work with react 18 and next.js.

Either that or archive the project completely.

marcofugaro commented 1 year ago

It doesn't even build locally with all the dependency updates

marcofugaro commented 1 year ago

Update: it was a problem with #553, disabling strict mode makes it work for now

henri-hulski commented 1 year ago

I was actually wrong. The React 18 fix was already released with overmind 28.0.2 and overmind-react 29.0.2. So if you're using these packages it's probably a different issue.

henri-hulski commented 1 year ago

Should be solved in #586. Please reopen if there's still a problem.