useState returns a stateful value, and a function to update it
useEffect will run after the render is committed to the screen
what-is-hooks/tutorial/src/Info.js
Line 11 in 8f8f8b9
useContext accepts a context object (the value returned from React.createContext) and returns the current context value for that context
useReducer accepts a reducer of type (state, action) => newState
, and returns the current state paired with a dispatch method
useMemo will only recompute the memoized value when one of the dependencies has changed
what-is-hooks/tutorial/src/Average.js
Line 28 in 8f8f8b9