Before I leave you, here are some tips to remember as you’re coding your components:
- Use JSX instead of the factory methods in the React API.
- Extend your components by composing them as higher-ordered components.
- Write your component as a stateless function unless you absolutely need to maintain state.
- When handling events or passing functions to other components, be sure to bind the
thiskeyword to the appropriate object.
- The most common way to incorporate Ajax into your component is with a higher-order component.
React is probably my favorite framework to date, and I hope I’ve passed a little of that excitement on to you. Please feel free to contact me via Twitter or the Envato Tuts+ forum if you have any questions.
1.Introduction1 lesson, 01:37
2.Hello, World2 lessons, 16:56
3.Bootstrap Button Group Component2 lessons, 20:48
4.A Digital Clock2 lessons, 20:41
5.A Multi-Selector Component1 lesson, 15:00
6.An Ajax-Powered Navbar2 lessons, 23:54
7.Conclusion1 lesson, 01:35
React is probably my most favorite library to date and it's my hope that I've passed just even a little of that on to you. React is a fantastic framework for building user interfaces because it makes sense to compose a UI from smaller and focused components. Well before I leave you, here are some tips to remember as you are writing your own components. First of all, use JSX instead of the factory methods in the React API. Extend your components by composing them as higher ordered components. Doing so gives you more flexibility as opposed to class based inheritance. And be mindful of states, because not every component needs to be stateful. So write your component as a function, unless you absolutely need to maintain state. Stateless components are more efficient than stateful components. When handling events or passing functions to other components be mindful of what object that function is bound to. If you use the vis keyword in that function you need to bind it to the appropriate object. There are many ways to incorporate Ajax into your components. But probably the most common way is to make the request in a parent or container component and pass the resulting data to the child component that needs that data. Thank you so much for watching this course. Please feel free to contact me via Twitter or the Touchplus forums if you have any questions. From all of us here at Touchplus, thank you, and I will see you next time.