I use React-Navigation deep linking to get params from an Url but I would like to pass these params to an object. Now I do this :
prefixes: [Linking.makeUrl('/'), 'https://test.app', 'https://*.test.app'],
config: {
screens: {
App: {
screens: {
Chat: {
path: 'chat/:firstName/:lastName/:birthdate',
parse: {
firstName: (firstName: string) => decodeURIComponent(firstName),
lastName: (lastName: string) => decodeURIComponent(lastName),
birthdate: (birthdate: string) => decodeURIComponent(birthdate),
},
},
This is the result :
const { firstName, lastName, birthdate} = route.params
And what I need is an object with inside firstName, lastName, birthdate :
const { userObject } = route.params