Øyvind Saltvik

Results 184 comments of Øyvind Saltvik

React.lazy is now in react 18, and works on the server. https://github.com/reactwg/react-18/discussions/114 One thing that is missing is "Injecting Into the SSR Stream", should rewrite the babel plugin so we...

Seems like loadable-compnents has suspense support in client. Will give it a try with react 18 server side suspense and see.

Copied this lazy from react 18, could be adapted to loadable https://codesandbox.io/s/react-18-custom-lazy-1liry3

React 18 with Suspense would be better if chunkextractor could have a reset method. Then we could use a custom writable in renderToPipeableStream that wrote the discovered components script tags...

So decided to not use https://github.com/brillout/react-streaming#injecttostream Instead I did this ```js let didError = false; let shellReady = false; class LoadableWritable extends Writable { constructor(writable) { super(); this._writable = writable;...

Tried adding loadable components with streaming react and suspense. Did not work.

Added support for streaming rendering with suspense here. https://github.com/fivethreeo/loadable-components/tree/feature/server-side-suspense/examples/streaming-server-side-rendering https://github.com/gregberge/loadable-components/issues/889

Will not add to razzle 3.x unless it is backwards compatible. Is await in node 12+ ?

If you use yarn you can force it with resolutions. Not sure we can switch to the new version yet due to esm.

all depends on when https://github.com/jaredpalmer/razzle/tree/alpha is done