Sep 20, 2020 — Tagged with webdev, react, codenewbie. ... const updateUrl = (newVal: string) => { setQuery(newVal); const query = getQuery(); if (newVal.trim() !== ... pushState({}, '', newUrl); } }; return [query, updateUrl]; }; export default useQueryParam; ... a while to find some advice on how to do this without React Router.
DOWNLOAD: https://tinurli.com/2f8wn4
DOWNLOAD: https://tinurli.com/2f8wn4
react-router-update-url-query-params
939c2ea5af
Comments