Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6581

How to send nested objects with router.navigate()?

$
0
0

I'm working on a project in Reac Native Expo and using "expo-router" to navigate between pages.I need to send a nested object array from one screen to another.

My object structure is something like this:

item: {   id: '123',   name: 'name',   nestedObjectArray: [{id: 1, name: 'name'}, {id: 2, name: 'name'}, {id: 3, name: 'name'}],}

I've used router.navigate(`({pathname: 'path/to/screen', params: item}) but in the other screen I'm receiving this:

item: {   id: '123',   name: 'name',   nestedObjectArray: [object Object], [object Object], [object Object],}

Any suggestions?


Viewing all articles
Browse latest Browse all 6581

Latest Images

Trending Articles



Latest Images