in the “I like mixins” reasons for the React.createClass factory pattern, it refers to react-router, however that is no longer current. The mixins approach is now deprecated with react-router
Composition. “Higher-Order-Component will work with both kinds of classes, and will be forward compatible with pure functions.”
I think that React will rid of these pseudo Classes sooner or later This is quite weird that React plays functional approach and here we get pseudo OO Classes. Even now, we have stateless function components.
Just an opinion.
For me Arunoda’s react-komposer is very interesting. I would like to read more about it and see more examples in demo apps. There will be also Mantra which will use this approach so it could be nice.
Yeah but the function components are bit janky for my taste - what about prop types, component names, etc? Perhaps decorators and similar will come to the rescue.
The mantra setup is actually really, really good. The function components are the proper use of the new recommended stateless/‘dumb’ components. component name is the name of the function. ‘smart’ components do have component names and props, but I do think correct prop type definitions need to be added to improve the examples.
That’s weird because we use the same babel transform, AFAIK… perhaps it will be better in Meteor 1.3, when we are unifying the ecmascript and jsx packages… @benjamn?
I guess one of my favorite things about React initially was OOP-style components, but I can see the benefit of a functional style as well.
Automatic displayName used to not work in the first Meteor + React implementation, and this was eventually fixed/added. So I’m assuming this is in fact a bug or needs implementation and will be added, so .displayName will just be temporary.
Thanks, rhywden. I must have missed where this was stated on their github.
Would you please provide a link citing this update so I can remove the step from the guide?
We just released an easy React and Tracker integration, one can not make this easier and the implementation can’t be lighter, it’s ridiculous how easy we’ve made it.
Bonus feature: Server Side Rendering (see the clip ;))
Learn how we build easy React Components with Meteor 1.2 and Tracker using Tracker.Component: