# Knowledge check: Advanced Hooks - Advanced React

1. **True or false:** `useReducer` **is a reducer function that takes in the initial state and an action and returns the new state.**
    
    * <mark>True</mark>
        
    * False
        
2. **True or false: The** `useState` **hook is best suited for complex state logic or when the next state depends on the previous one.**
    
    * True
        
    * <mark>False</mark>
        
3. **A common scenario for using the** `useRef` **hook is to...**
    
    * <mark>...focus the cursor into an input field.</mark>
        
    * ...control a component's state.
        
    * ...handle side effects.
        
    * ...memorize expensive operations.
        
4. **True or false: Building your own Hooks lets you extract component logic into reusable functions**
    
    * <mark>True</mark>
        
    * False
        
5. **The** `useState` **hook gives us a reliable way to...**
    
    * <mark>... deal with state updates in React components.</mark>
        
    * ... deal with state updates in React prompts.
        
    * ... deal with state updates in React dependency arrays.
        
    * ... deal with state updates in React useEffect invocations.
        

---

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1726470241598/120523e6-c8f8-461e-88d0-984966a4bea6.png align="center")
