Setup
Setting up routing
You need to set up page routing to redirect users to different pages based on their search requests or when clicking on a category in the category navigation.
The SDK supports page routing in Next.js applications without any extra configuration. If you’re using next.js, skip to the next step.
However, React.js applications using other routing solutions must use the navigateFunction
property on the DepictProvider
wrapper to handle routing to search result pages as shown:
When using React Router
📘 If using another routing library, you can define your navigation function compatible with React Router’s NavigateFunction type. (Note: you have to support the replace
option)
Was this page helpful?