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.
- 2020年01月09日
- 5 分
React Pitfalls: useState initialization