React Mixins

InstructorJoe Maddalone

Share this video with your friends

Send Tweet

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

Free Community Resource

A Community Resource means that it’s free to access for all. The instructor of this lesson requested it to be open to the public.

Christopher
Christopher
~ 6 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 Maddalone
Joe Maddalone(instructor)
~ 6 years ago

https://github.com/joemaddalone/ReactSublimeSnippets

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

John
John
~ 6 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
Bachir
~ 6 years ago

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

David
David
~ 6 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
Jordan
~ 5 years ago

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

Joe Maddalone
Joe Maddalone(instructor)
~ 5 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