brocoders / redux-async-connect

It allows you to request async data, store them in redux state and connect them to your react component.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

first entry page miss render

mhbseal opened this issue · comments

client render,async connect data,A(page) -> B(page),B render 1 times,but B(page) -> B(page),B render 3 times. eg.
https://github.com/erikras/react-redux-universal-hot-example, Widgets Page.

@asyncConnect([{
  //deferred: true,
  promise: ({store: {dispatch, getState}}) => {
    //if (!isLoaded(getState())) {
      return dispatch(loadWidgets());
    //}
  }
}])

i think that asyncConnect don't inject loading and loaded state in first entry page!