Flatiron Labs
Published in

Flatiron Labs

How to Test React Hooks (The Async Ones)

An adventure in patience

As I have started writing new code using React hooks, I have noticed some occasional issues when testing components with async calls using the React.useEffect. I wanted to share some examples of some tricks I have learned and implemented in my own code.