# React Authors - Hooks API Reference – React (Highlights)

## Highlights
- If the new state is computed using the previous state, you can pass a function to setState
Useful to not depend on a stalled state captured by the closure.
- If you want to run an effect and clean it up only once (on mount and unmount), you can pass an empty array ([]) as a second argument.