You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When defining the type for ParamsList it is not possible to make passing parameters optional. It is only possible to have no parameters at all or some.
Here are some examples to demonstrate:
typeRootStackParamsList={screen: undefined,screenWithParams: {a: string},screenWithOptionalParams: {a?: string}|undefined,}navigate('screen')// OKnavigate('screenWithParams',{a: 'a'})// OKnavigate('screenWithParams')// errors OKnavigate('screenWithOptionalParams',{a: 'a'})// OKnavigate('screenWithOptionalParams',{})// OKnavigate('screenWithOptionalParams')// errors but should work.
This means that if screen params are {} | undefined we should allow not passing any parameter to navigate for this screen.
The text was updated successfully, but these errors were encountered:
When defining the type for
ParamsList
it is not possible to make passing parameters optional. It is only possible to have no parameters at all or some.Here are some examples to demonstrate:
This means that if screen params are
{} | undefined
we should allow not passing any parameter tonavigate
for this screen.The text was updated successfully, but these errors were encountered: