quantizor / buttermilk

beautifully simple isomorphic routing for React projects
https://buttermilk.js.org/
MIT License
110 stars 6 forks source link

Error using dynamic imports with react-is@16.12.0 #20

Open nerdstep opened 4 years ago

nerdstep commented 4 years ago

This might be an issue further upstream, but updating to react-is@16.12.0 breaks dynamic imports.

Works fine using 16.11.0:

https://codesandbox.io/s/buttermilk-react-is-11-h2pke

But update to 16.12.0:

https://codesandbox.io/s/buttermilk-react-is-12-zjn9d

And we get the following error:

Error
A React component suspended while rendering, but no fallback UI was specified.

Add a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.
    in Unknown (created by Router)
    in div (created by Router)
    in Router (at src/index.js:11)
    in div (at src/index.js:8)
    in App (at src/index.js:20)
quantizor commented 4 years ago

Frustratingly I think it means Suspense has to be extracted from the library and composed by the developer above Buttermilk. I'm having trouble setting up a useful test to verify this though...