Usage of the _uid as a React key? - the field has type string | undefined #1045
Labels
pending-author
[Issue] Awaiting further information or action from the issue author
pending-triage
[Issue] Ticket is pending to be prioritised
Describe the issue you're facing
I am using pretty old version of the lib (1.3.3) and tried to upgrade that in the project but one of the problems is that the type of the
_uid
was changed at some point from_uid: string;
to_uid?: string;
.I am using it in the project everywhere when enumerating children.
Is this a typing issue or the
_uid
can be actually in some casesundefined
and I should update the project to stop using that as a Reactkey
?Same with
component: TComp;
is now:component?: T;
- so I cannot be sure that the component will be always set?I know this is the code from
storyblok-js-client
but it has direct impact on this lib and I am wondering how to solve that.Reproduction
https://github.com/storyblok/storyblok-js-client/blob/644fd93eae990a9f0e36c59c68aa9fab9d81469a/src/interfaces.ts#L76
Steps to reproduce
No response
System Info
Used Package Manager
npm
Error logs (Optional)
No response
Validations
The text was updated successfully, but these errors were encountered: