Introduction | Yext Hitchhikers Platform
When using the Search UI React component library, search state is maintained by SearchHeadless
instance which uses a Redux store under the hood. However, if you want users to be able to navigate to different pages for different search verticals or share their search with other users, the search state needs to be persisted in the URL.
Note
Much of this guide does not pertain to Yext Pages applications. This guide is designed for use with Single-Page React applications (e.g.
Create React App
,
Vite
).
In this guide, we will walk through how you can use React, React Router, and Search Headless to map search state to the URL and vice-versa.
- Give each search vertical a unique URL
- Navigate between search verticals
- Add the query string as URL search parameter
- Add “View All” buttons to vertical sections in Universal Results
<% elem.innerText %>