React-router: Match blocking server side rendering with onEnter hook (under high load)

Created on 31 Mar 2017  路  1Comment  路  Source: ReactTraining/react-router

Version

3.0.3

Steps to reproduce

Universal app setup, using onEnter hook to defer the page rendering until data is loaded, requests intervals should be shorter than data fetching/async task.

Probably the problem is here.

Expected Behavior

Match callback should be called on every request after the async task.

Actual Behavior

Match callback is executed after all requests, seems that all async callbacks are queued in an unique stack.

Most helpful comment

You shouldn't use onEnter for data loading. Instead, get your components from match and use static properties to determine what data is needed before you renderToString.

>All comments

You shouldn't use onEnter for data loading. Instead, get your components from match and use static properties to determine what data is needed before you renderToString.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

misterwilliam picture misterwilliam  路  3Comments

sarbbottam picture sarbbottam  路  3Comments

yormi picture yormi  路  3Comments

Waquo picture Waquo  路  3Comments

nicolashery picture nicolashery  路  3Comments