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>
);
}
Source: stackoverflow.com
Related Query
- React - Add query string via text input on change
- How to query by text string which contains html tags using React Testing Library?
- Bind text input value on change event - React Native + Redux
- Change focus of text input with react
- React Router V6 change component based on query string
- Add rows via input AgGrid React
- Add icon inside text input in Material UI and React
- React controlled component unable to set on change text input
- React- How do I add react icons to input field that change depending on Formik / Yup validation?
- How to mock input change for filtering data based on input string using react testing library?
- add onChange to input in string in react
- How to add input text event handler in react
- Change the input text file in react
- How to change material input text style react js
- How to change variant of text input in react admin
- How to properly add React window.addEventListener to be able to change useState via it
- How I can add Input text and show in li that created by map in react
- How to add suggestion box to text input in React
- How to change the value of a React text input using jQuery?
- Can't type in React input text field
- How to render a multi-line text string in React
- How to align text input correctly in react native?
- Why can't I change my input value in React even with the onChange listener
- Why can't I change my input value in React even with the onChange listener
- GET with query string with Fetch in React Native
- How to add strike through on Text in react native?
- React - change input defaultValue by passing props
- React doesn't reload component data on route param change or query change
- How can I test a change handler for a file-type input in React using Jest/Enzyme?
- Updating a React Input text field with the value on onBlur event
More Query from same tag
- Issues on animating a conditionally rendered component using React-spring
- using immutability-helper to $merge an array
- WSGIServer backend with React - Handling long running script
- Why isnt this React variable working in my state object?
- What are some techniques for swapping out sample data in Redux/React?
- Can Material UI and Bootstrap be used together?
- Difference between with and without useEffect in react functional component
- React.js row.map is not a function
- How can I make useEffect() optional based on props
- Using redux and got Parsing error: Unexpected token
- What happens if pass function component as state variable?
- Dynamically load images before render
- React-native: "could not connect to development server"- android app
- Match multiple exact routes
- Implement react-mobile-datepicker using redux-form
- Firebase update Function is sometimes slower executed
- Partytown implementation with React.js
- ReactJS - Pass parameter from blade to JSX
- add mouse event to svg <pattern>, detect grid hover
- react draggable window off the screen in Full Screen mode
- page/static graphql query becomes empty after page navigation
- Add class to individual button using react Hook
- While creating a react app I'm getting following error or errors
- Clear parent state from child
- API Key returning undefined react
- How show Highlighted options in react-select
- Maintaining a WebSocket connection with React-Router
- matching passwords with react hooks is not working after onchange
- React "Cannot update a component (`BrowserRouter`) while rendering a different component" warning when registering a new user using firebase
- Component lose its state when re-renders