ctrlplusb / react-async-bootstrapper

Execute a bootstrap method on your React/Preact components. Useful for data prefetching and other activities.
MIT License
117 stars 12 forks source link

SSR does not work correctly after upgrading to 2.0.0 #8

Closed JounQin closed 6 years ago

JounQin commented 6 years ago

Before upgrading, it will wait for API called even at the first time and render whole page, but after upgrading, no list content is renderer at the first time.

You can check https://github.com/JounQin/react-hackernews and run yarn dev and visit http://localhost:4000 to view the correct SSR page, then simply upgrade react-async-bootstrapper to 2.0.0, then you will see incorrect page at first rendering.

Online Link: https://react-hn.now.sh/ (not upgrade yet)

I don't know if it is related to react-async-bootstrapper@2.0.0 or react-async-component@1.0.2 is not compatible with react-async-bootstrapper@2.0.0

ctrlplusb commented 6 years ago

Yep, react-async-component needs to be updated before that will work. It's in progress.

ctrlplusb commented 6 years ago

FYI, I have released an alpha version of react-async-component that works 👍

hanaarena commented 6 years ago

@ctrlplusb does the alpha version published to npm? it seem bootstrap still not works in SSR