None of these example have card->page interactions with state passing. Please add.
The Experience SDK docs say "Include the optional state object if you want to pass variables between a card and a page. This works only when using the route parameter. It uses the react-router-dom's location object to get the state". Using the route and state parameters together in navigateToPage I can transition from card to page. But no luck getting the state to pass. It's not in the props and useLocation() throws an exception "Cannot read properties of undefined (reading 'location')". Following the docs on react router doesn't work because they don't fit the Experience SDK paradigm.
None of these example have card->page interactions with state passing. Please add.
The Experience SDK docs say "Include the optional state object if you want to pass variables between a card and a page. This works only when using the route parameter. It uses the react-router-dom's location object to get the state". Using the route and state parameters together in navigateToPage I can transition from card to page. But no luck getting the state to pass. It's not in the props and useLocation() throws an exception "Cannot read properties of undefined (reading 'location')". Following the docs on react router doesn't work because they don't fit the Experience SDK paradigm.