DEV Community

loading...

Discussion on: Showing "new version available" notification on create-react-app PWAs

Collapse
daniellycosta profile image
Danielly Costa Author

I'm so sorry not seeing your comment before... I think that maybe the setState function is not updating the state before calling the post message function ( reactjs.org/docs/state-and-lifecyc...).
Or if it's an old version, maybe the create-react-app doesn't create the service-worker file with postMessage function and you must configure the webpack configuration manually