-
Notifications
You must be signed in to change notification settings - Fork 61
Description
Hey, thanks for your work on this.
I use componentWillMount to kick off some redux-thunks that do data fetching for my component on the server side.
Since react-async-component walks the tree to find the async components, it triggers all of the componentWillMount calls...then I still have to render the resulting appWithAsyncComponents with react-dom that invokes all of those componentWillMounts again.
The result is that I end up hitting my API twice for everything...once while finding the async components, and once when actually rendering to string.
UPDATE: I also find when using react-resolver that the same occurs. Essentially, any data fetching / expensive activity that's triggered by a pass over the tree would have to happen twice with this sort of approach.