T
TanStack4mo ago
exotic-emerald

"Cannot read properties of null" error in a test that renders a component that uses useState

I'm seeing TypeError: Cannot read properties of null (reading 'useState') when running a test (Vitest/Testing Library) that renders a component that uses a hook that uses useState and useEffect hooks. The first version I noticed this happening on is the 1.129.1 release of Start, so I'm hoping that may narrow things down and point to what might be causing this. I've tried the latest release of Start (1.130.15) and several prior to that and all result in the same error.
2 Replies
optimistic-gold
optimistic-gold4mo ago
do you have a reproducer?
exotic-emerald
exotic-emeraldOP4mo ago
No, not yet

Did you find this page helpful?