setState variable as path doesn't work
The following works
However, this doesn't work, why?
path
is always one of the possible keys inside items
object.
ts error:
2 Replies
having values as types in argument list resolves the issue 🤔
it's the same type of type-error like
because
'string' can't be used to index type '{ key: string; }'
while