- Overview
- Transcript
7.1 Conclusion
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
this
keyword 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
1.1Five Practical Examples to Learn React01:37
2.Hello, World2 lessons, 16:56
2.1React's Built-In Factory Methods09:38
2.2Defining DOM-Specific Props to our Components07:18
3.Bootstrap Button Group Component2 lessons, 20:48
3.1JSX and Stateless Components08:59
3.2Passing Props to Components11:49
4.A Digital Clock2 lessons, 20:41
4.1Writing a Stateful Component12:42
4.2Higher-Order Components07:59
5.A Multi-Selector Component1 lesson, 15:00
5.1Events and Passing Functions15:00
6.An Ajax-Powered Navbar2 lessons, 23:54
6.1Tools for Everyday Development14:16
6.2Using Ajax in Your Components09:38
7.Conclusion1 lesson, 01:35
7.1Conclusion01:35
7.1 Conclusion
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.