Closed 0xdevalias closed 5 years ago
Of course I realise it's a bug in my own code just after I make an issue for it.. seems the variable I was passing as the identifier was actually undefined
due to my own bug, so the type definitions seem to work correctly passing id
as the 3rd or 4th param.
I'm not 100% if this is a bug, or a me problem, but it seems that your TS definitions imply that i can call
useReducer
with 3 params, and have it take theid
from the 3rd param:node_modules/reinspect/types/useReducer.d.ts
But when running the code, and debugging, it looks like that isn't actually the case:
I assume the current 'solution'/workaround is what is referred to in the README, namely:
If that is intended as the only way to use this, then updating the type defs to disallow passing id as the 3rd param would be great.