Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
mikewhy
on July 8, 2015
|
parent
|
context
|
favorite
| on:
React on ES6+
Wouldn't you have to use `React.createFactory` in this case as well? (when not dealing with React.DOM components)
dugmartin
on July 8, 2015
[–]
Yes you do need to use it. I put each component in its own file and use Browserify to require them in like this:
MyComponent = React.createFactory require './my-component'
then you can do
render: -> (div {}, (MyComponent {}) )
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: