You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to suggest a future upgrade to full ES6 and to class foo extends React.Component from var foo = React.createClass at some time in the future.
"Facebook does suggest the future removal of React.createClass completely in favour of ES6 classes. For now, use what makes sense, they’re both just syntax with different semantics that do the same thing - they’re both classes!" https://toddmotto.com/react-create-class-versus-component/
The text was updated successfully, but these errors were encountered:
I think the trend is definitely to embrace higher order components and the extends React.Component style, especially with ES6. For instance, the new Meteor React Tutorial uses this pattern and Kadira's Mantra also uses it.
With that said, I think it is fine to continue to use React.createClass especially for this type of UI package, and of course, it is your code base so you obviously get to pick the style.
I think that last article is about something else?
Anyway, it indeed seems the class extends style is on the rise. As soon as Facebook starts recommending it we can fix it as well. But for now I want to focus on completing all functionality of Meteoric :)
I'd like to suggest a future upgrade to full ES6 and to
class foo extends React.Component
fromvar foo = React.createClass
at some time in the future."Facebook does suggest the future removal of React.createClass completely in favour of ES6 classes. For now, use what makes sense, they’re both just syntax with different semantics that do the same thing - they’re both classes!"
https://toddmotto.com/react-create-class-versus-component/
The text was updated successfully, but these errors were encountered: