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

You don't need to "mix" React with templates because JSX files are very similar to HTML, except for a few gotchas[1].

We have JSX components that look like templates and have little logic, so they are as straightforward to our designer (who only knew HTML) as possible. He tweaks them all the time. For example, it might be a component like `Button`, `FormField` or `UserItem`.

We compose those simple elements into more complex JSX files that have more state and logic, like `FeedbackForm`, `UserProfile`, etc. Still, designer can work on them, if he wants to change DOM layout or CSS classes.

[1]: http://facebook.github.io/react/docs/jsx-gotchas.html



Yup, in my experience getting designers to work on the JSX has been a far smaller headache than I initially expected.




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

Search: