React Mixins

InstructorJoe Maddalone

Share this video with your friends

Send Tweet

Mixins will allow you to apply behaviors to multiple React components.

Christopher
~ 10 years ago

Hey I'd just like to know what you're using for your sublime shortcuts for the react snippets(like when you type rec to shortcut create a component)

Sorry if you've posted/explained this somewhere else!

Joe Maddaloneinstructor
~ 10 years ago

https://github.com/joemaddalone/ReactSublimeSnippets

For ST3 you only need "ReactSnippets.sublime-package", for ST2 you need the entire "snippets" directory.

John
~ 9 years ago

When following along in this lesson I had to use uppercase component names (ButtonComponent, InputComponent) to keep me from getting the dreaded "Cannot read property 'replace' of undefined" error. Apparently this is a recent change? Found problem and solution on StackOverflow.

Bachir
~ 9 years ago

Good find! got stuck on this for a while until I read your comment. thanks!

David
~ 9 years ago

Yeah, thanks. I'd wish the creators would update it with a note or something, because this is part of the Pro plan and this will frustrate a ton of us. Not everyone is aware of the discussion tab.

Jordan
~ 9 years ago

Aren't mixins effectively deprecated? https://medium.com/@dan_abramov/mixins-are-dead-long-live-higher-order-components-94a0d2f9e750

Joe Maddaloneinstructor
~ 9 years ago

React.createClass and mixins won't be going anywhere any time soon, but if you want a look at using higher order components in ES6: https://egghead.io/lessons/react-react-mixins-with-es6-components