YahooArchive / fluxible-router

MOVED TO FLUXIBLE REPO
104 stars 26 forks source link

Getting cryptic setState warnings on the console with <NavLink /> #18

Closed geekyme closed 9 years ago

geekyme commented 9 years ago

Hi,

I just upgraded to fluxible-router and I discovered that when I click my NavLinks I see the following warning on the console:

warning.js:48 Warning: setState(...): Can only update a mounted or mounting component. This usually means you called setState() on an unmounted component. This is a no-op.

It usually happens on the third-viewed page and beyond.

Is there some kind of weird race condition going on?

geekyme commented 9 years ago

I reproduced the issue in this fork https://github.com/geekyme/flux-examples/tree/master/fluxible-router

All I had to do was add a NavLink in Home.js and the warnings start showing up.

mridgway commented 9 years ago

This seems related to https://github.com/facebook/react/issues/2787. I think this could be worked around in connectToStores but not sure if that is ideal. I will continue to investigate.

mridgway commented 9 years ago

This should now be fixed if you upgrade fluxible to v0.4.7. See https://github.com/yahoo/fluxible/issues/156