Skip to content

Latest commit

 

History

History
69 lines (40 loc) · 3.36 KB

react.md

File metadata and controls

69 lines (40 loc) · 3.36 KB

React

Hooks

Video Introduction (and official docs)

Context

Per the docs, Context is designed to share data that can be considered “global” for a tree of React components, such as the current authenticated user, theme, or preferred language.

Still per the docs, Context is primarily used when some data needs to be accessible by many components at different nesting levels. Apply it sparingly because it makes component reuse more difficult. If you only want to avoid passing some props through many levels, component composition is often a simpler solution than context. (see Using Composition to avoid Prop Drilling)

Styling

CSS Modules

What are CSS Modules and why do we need them
Understanding the CSS Modules Methodology

styled components

styled-components.com

PropTypes

React allows you to check the types of a component's props (to mitigate bugs) with PropTypes.

Code Splitting

Code Splitting can improve performance by reducing the amount of non-used code being loaded by our app.

docs

State management libraries

In more complex applications, organizing the state can quickly become a challenge.

Redux

Redux is based on the Flux architectural pattern and aims to bring a single store -an immutable state- for the data that all components in our application rely on and update.

reduxjs.org A Cartoon intro to Redux
Adding Redux to a Simple React App

MobX

MobX offer a different approach, more object-oriented than Redux's functional approach, with multiple stores and a mutable state.

Mobx.js.org
Redux vs MobX

Testing

Reactjs.org docs
common testing patterns
snapshot testing with Jest
How to test React with Jest and Enzyme

React Native

Mobile app development approaches explained

React Native is a popular option (especially for JavaScript developers) to build mobile apps as, being a cross platform framework, it doesn't necessitate to be proficient in Swift/Objective-C (iOS) and Java/Kotlin (Android) to build an app that's supported by all smartphones.

the docs
A Definitive React-Native Guide for React Developers
React Native examples
CS50 React Native Course