• January 09, 2020
• 5 minutes
React Pitfalls: useState initialization

This is a quick post about a “gotcha” I encountered recently in a React application. This involved the use of React’s useState hook, which had a subtle difference between how I thought the hook worked, and how it actually worked.