React Hooks best practices
I've been working with React Hooks for a while now, and I'm curious about the community's best practices. There are so many ways to structure hooks, and I want to make sure I'm following the most effective patterns.
Some specific questions:
- How do you organize custom hooks in larger projects?
- What's your approach to useEffect dependencies to avoid infinite loops?
- Do you have any patterns for managing complex state with useReducer?
- How do you test custom hooks effectively?
I'd appreciate any insights or resources you can share!