score:0

i think you can pass the input value to url something like this. hope this helps

https://codesandbox.io/s/eager-haze-o8hj9

import "./styles.css";

export default function app() {
  const handlechange = e => {
    const inputvaluetourl = encodeuri(e.target.value); 
    window.location.href = inputvaluetourl
    console.log(e.target.value);
  };

  // this is how i am currently using in my app 
  // note: i am passing ids as props from the parent component.

  // const auurl = `/about/user?ids=${ids}`;
  // const endcodeauurl = encodeuri(auurl);
  // const viewuserclick = () => {
  //   if (ids.length) {
  //    window.location.href = endcodedauurl;
  //   }
  // };


  return (
    <div classname="app">
      <label>simple text inpunt</label>
      <br />
      <br />
      <input type="text" onchange={handlechange} />
    </div>
  );
}

Related Query

More Query from same tag