Question re custom routing with statemapping
#5319
-
So I'm working with routing and basically followed based from the discussion here. I'm happy with the initial results but there are two things that made me explore the old solution I've tried before which is described here. In my local setup, I was able to make the URLs update based on say updating query but in this codesandbox that I created, I'm seeing different results. Maybe that's because I'm using the components before react-instantsearch-hooks-web were created. The primary reason why I needed to go such length is that I need to do customization on the URL such as make it SEO friendly and/or add some unique id's to indicate UI specifics such as what media is loaded when the app loads from a given URL. What could I be missing here? Here are my observations so far below:
I appreciate any thoughts here. Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 0 comments 10 replies
-
There's a couple very small confusions that happened to make your example not working:
A working example is https://codesandbox.io/s/upbeat-diffie-126rrb?file=/App.tsx Note that there's a small thing I noticed is that while the InstantSearch type is generic to allow a different route state than ui state, it wasn't yet allowed in React InstantSearch hooks yet. I've opened algolia/react-instantsearch#3466 to address that |
Beta Was this translation helpful? Give feedback.
There's a couple very small confusions that happened to make your example not working:
A working example is https://codesandbox.io/s/upbeat-diffie-126rrb?file=/App.tsx
Note that there's a small thing I noticed is that while the InstantSearch type is generic to allow a different route state than ui state, it wasn't yet allowed in R…