So I have been using
import { useRoute } from '@react-navigation/native'
const ProductInfo = () => {
const {
params: {
category,
coreProduct,
subProduct
},
} = useRoute()
return (
<Text>{category}</Text>
<Text>{coreProduct}</Text>
<Text>{subProduct}</Text>
{...}
to carry over choices the user would make with buttons, or image selections through an app, and for the most part, I have no issue with this. for instance, I have been able to carry over choices from three separate screens, display the previous screens choice in the title, (Example: Men's > Shirt > Casual Wear) and onto the next page, but for some reason bringing this back to the main page to display all three choices brings up a Render Error of "undefined is not an object (evaluating '_useRoute$params.category')" I happened to fix this once before, but then after some edits made to the choice screens it has reappeared and cannot figure out the problem.
If more code example is needed please let me know and I can add an example of the flow I have for these 4 screens, main, option 1, option 2, option 3, then return to main.
Thanks for your time!