-
-
Notifications
You must be signed in to change notification settings - Fork 32
Open
Description
Currently the worker.start() is not being returned or awaited, sometimes that will cause the worker to be started after react renders. Causing conflicts with React Router. Simple return should be able to fix this issue.
import('../mocks/browser')
.then(async ({ worker }) => {
worker.start() // Will cause a race condition if not awaited or returned.
}) // Run <App /> when Service Worker is ready to intercept requests.
.then(() => {
root.render(<App />)
})Metadata
Metadata
Assignees
Labels
No labels