birdofpreyru / react-utils

ReactJS development kit.
https://dr.pogodin.studio/docs/react-utils/index.html
Other
3 stars 0 forks source link

Re-think the usage of lazy() for code-splitting #286

Closed birdofpreyru closed 1 year ago

birdofpreyru commented 1 year ago

https://github.com/birdofpreyru/react-utils/blob/e078475632e5979cf8ec81026a690279729fb0e5/src/shared/components/CodeSplit/index.jsx#L47-L51

^ This is bad, according to React docs: https://react.dev/reference/react/lazy#my-lazy-components-state-gets-reset-unexpectedly

Probably this is what caused #285