Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> I would imagine it's possible to greate "progressive enhancement" stype React components, so that you'll yield virtual DOM for a plain input box, and somehow enhance it with a auto-complete JS.

You can put initialization code that needs to be done both in client and server in componentWillMount. Code that needs to be executed only in the client (ex jQuery integration) should be in componentDidMount which is only executed in the client.

I'll make sure it is documented. Edit: https://github.com/facebook/react/pull/1288/files



Thank you for that. I was about to ask whether react on the server + react on the client is possible (instead of exclusively server or exclusively client).

Is there a tutorial targetting such scenario specifically?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: