Description
React Easy State version: 6.3.0
Platform: browser
Describe the bug
When starting a fresh create-react-app in React18 the state is stuck in the initial state and does not update the DOM at all.
Only after you change a single file, and hotReload kicks in, will it start working properly. After page refresh (f5) it returns to the broken state and needs another file change and hot reload to start working again.
At the same time setState does change the page contents.
After building the app and serving the final files, this does not happen anymore; it works properly from the get-go.
Disabling Fast-Refresh prevents react-easy-state from working at all.
For tougher bugs
To Reproduce
fresh create-react-app install
App.js:
`import './App.css';
import { store, view } from '@risingstack/react-easy-state';
const mainStore = store({
bla: 'bla'
})
function App() {
setInterval(() => {
mainStore.bla += 'adsd';
}, 100);
return (
{mainStore.bla}
);
}
export default view(App);
`
Expected behavior
State should update, doesn't.
Starts updating again only after changing anything here and HotReload kicks in.