|
|
|
|
|
by jbhatab
4245 days ago
|
|
Thanks for the response. Could you give me a quick example of calling a component with object literals instead of functions? I'm not understanding how that will play out in the final code. Also, isn't it just adding React.createFactory, not replacing React.createClass? |
|
element = type: 'div' props: className: 'container', children: [ type: 'span', props: className: 'foo' type: CustomClass, props: className: 'bar' ]
(This doesn't fully work in 0.12 because we also have some extra properties on there but that's the direction we're going.)
0.12 is just adding React.createFactory. 0.13 will optionally replace React.createClass.
We do this so that there's a seamless upgrade path. We have to remove the warnings to fix the classes.