I’ve configured my app to migrate across live reloads using this little bit of code:
ReactInstance = Meteor._reload.migrationData('react-ui') or {}
Meteor._reload.onMigrate 'react-ui', ->
saveReact()
return [true, ReactInstance]
However, I’m noticing that if I edit some code, the browser does some kind of refresh, but not the kind triggered by Meteor._reload.reload()
. The subscriptions appear to be reset but the UI is stale.
I get an error saying that I’m calling setState on a React component that isnt mounted, which never happens unless I edit some client side code and wait for this background refresh which I know happens when the subscription reset message is sent.
Any ideas what this is? It seems like development mode refresh or something, but its causing me troubles. How can I learn more about this?