React Patterns and Practices
or
Beyond the React Basics
or
Build a Large Web App with React
This talk is meant for developers who have a basic understanding of React and Flux. They should be able to create a basic React component. I build off of these basics concepts and proceed to more intermediate and advanced considerations.
The take aways are concrete patterns and practices that a React developer can hopefully introduce into their own applications.
Now that you have a basic understanding of React, let's push forward and explore some more advanced topics. We'll cover subjects such as Container vs Presentational Components. We'll talk about sharing code High Order Components, Function as Children, or Custom Hooks. We'll dive into identifying performance concerns, leveraging immutability, testing your components, and creating a pattern library.
Getting started with React doesn't take very long, but there are a variety of other patterns and practices that you, as a developer, will need to understand and tackle as you use React more and more.
After this session you will be exposed to the following concepts that are helpful when creating a large front-end React application:
- Knowing the difference between Container and Presentational Components
- Stateless Functional Components
- Sharing logic via High Order Components, Function as Children, or Custom Hooks
- Assessing Performance Bottlenecks
- Integrating Immutability into your Application
- Creating a Pattern Library
- Unit Testing React Components
Resources:
- Container vs Presentational Components
- https://css-tricks.com/learning-react-container-components/
- http://krasimirtsonev.com/blog/article/react-js-presentational-container-components
- https://www.fullstackreact.com/p/using-presentational-and-container-components-with-redux/
- http://jaketrent.com/post/smart-dumb-components-react/
- http://andrewhfarmer.com/react-ajax-best-practices/
- https://medium.com/@dan_abramov/smart-and-dumb-components-7ca2f9a7c7d0#.3v1208kgq
- https://twitter.com/housecor/status/818519736501895169
- Flux
- High Order Components
- Function as Children
- Performance Concerns
- Immutability
- Unit Testing
- React Pattern Library
https://github.com/vasanthk/react-bits https://github.com/chantastic/reactpatterns.com
Additional Topics:
- Unique keys in your lists
- Binding
this
in your methods - Portals
- setState function
- linting / prepush
- importing / tree-shaking
- refs
- https://medium.com/code-life/our-best-practices-for-writing-react-components-dec3eb5c3fc8#.1x6fgvk7m