diegohaz / constate

React Context + State

Home Page:https://codesandbox.io/s/github/diegohaz/constate/tree/master/examples/counter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

React Fast Refresh doesn't work on Constate side

popo63301 opened this issue · comments

Hello !

When I update things in components side, they are updated.
But when I update my Constate file, my app doesn't update.

Any idea why ?

commented

No idea! If you can provide a reproduction in CodeSandbox I can take a better look.

I've created a reproduction repo: https://github.com/popo63301/constate-reload-problem

  1. You can start by clicking on counter to update the value.
  2. If you update the HTML inside App.js, things get updated and the value is still kept.
  3. If you change the file constate/index.js, say you change increment value of 1 to 4, and you test by clicking Counter, increment is not updated.

The only way to update the function is to reload the page.

I think this library is really amazing but it would really be annoying to refresh manually the page. 😄

Can you check that out please ?

@popo63301 Have you solved the issue already?

@marwojcik didn't check more, I went for an other approach I think.

I am facing the same issue any workarounds?