andreypopp / andreypopp/react-async

client bootstrapping json does not work correctly if page has multiple async components

オープン
#44 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
JavaScript
スター
440
フォーク
24
PR マージ指標
30日以内にマージされた PR はありません

説明

I am rendering a component on the server. This component has three child components. Each of these child components call getInitialStateAsync. When the page is loaded on the browser, it looks like react async is trying to boostrap first child component with the json that was dumped by the server. However, the json that its attempting to load is from the third child component.

It looks like we can only safely call getInitialStateAsync once on the server. Calling it multiple times overrides the previous json dump. So in my case, each of the child components call getInitialStateAsync and their json dumps override the previous dump. So on the client, react-async is attempting to bootstrap the first child component with the third's json data. The remaining two child components do not get bootstrapped at all.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。