xtuc / async-reactor

Render async Stateless Functional Components in React

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support server rendering

arunoda opened this issue · comments

I'm not asking for Server Render support.
But when run inside such environments, try to work with them.

So, basically in the we should not run any logic.

Try to use componentDidMount here: https://github.com/xtuc/async-reactor/blob/master/src/index.js#L30

Or if not, run the logic only the app on the client, otherwise the Loading component.

Yes, I used componentWillMount on purpose. SSR was not my initial use-case but i'm totally open to that.

So thanks for this issue and your recommendation, I'll work on this.

  • I used componentDidMount instead #10
  • Added tests for SSR in #13

@xtuc Superb. I hope I can close this now.