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

jzimmek picture jzimmek  路  3Comments

andrewpillar picture andrewpillar  路  3Comments

nicolashery picture nicolashery  路  3Comments

misterwilliam picture misterwilliam  路  3Comments

Radivarig picture Radivarig  路  3Comments