How do I sync my search state with react instant search between navigations?

Hello everyone, I am following this documentation right here - Sync your URLs with React InstantSearch | Algolia

However, It’s only a snippet of code and I don’t understand where the props are coming from.

export function App({ location, history }) {
  const [searchState, setSearchState] = useState(urlToSearchState(location));
  const debouncedSetStateRef = useRef(null);

  function onSearchStateChange(updatedSearchState) {

    debouncedSetStateRef.current = setTimeout(() => {
      history.push(searchStateToUrl(location, updatedSearchState));


  useEffect(() => {
  }, [location]);

Are there any actual codesandbox examples using hooks to implement this functionality?