score:0
Accepted answer
i assume the problem is when you fill one input and try to change another, the first one is being cleared out, right ?
it's due to the fact, that you create a new info
object in your state. if you change your updateinfo
function to:
updateinfo = e => {
this.setstate({ info: { ...this.state.info, [e.target.name]: e.target.value } });
};
Source: stackoverflow.com
Related Query
- How to create login configuration
- How do I create configuration for axios for default request headers in every http call?
- How to create and run a development build of an application using create-react-app configuration
- How can I create a custom page with #react-admin without the menu sidebar like login page?
- How can we create and returns a 404 page, if someone access pages via url without login
- How to create login and redirect to another page after success?
- How add login page to a react create app?
- How can I create a configuration file for react and prevent webpack bundling it?
- How to create a login screen with changing background images?
- React SSR(Server Side Rendering) for SEO before login and after login Create React App (CRA). How to do this in one project folder?
- How to create a protected route after login in reactjs
- How do I create a multiple page app with a login component in react?
- How can i create a login page separately from my other single page application in react js
- how to create login ui and user can choose role after login they redirect to rolebased dashboard in mern stack
- How do I create a login form and response in React.js?
- How to create helper file full of functions in react native?
- How to create a React app directly in the current folder
- How to create unique keys for React elements?
- How to create dynamic href in react render function?
- How to store Configuration file and read it using React
- How is ESLint integrated into Create React App?
- How to create multiple page app using react
- How to create a React Modal (which is appended to <body>) with transitions?
- How to create a dynamic prop name in React?
- How to create text border in React Native?
- How do you create optgroups in react-select v2?
- How do I create a dynamic drop down list with react-bootstrap
- How to create forms with React and Rails?
- How to hide navbar in login page in react router
- How to generate sourcemaps in create react app?
More Query from same tag
- ESLint error: 'default' is restricted from being used as an exported name
- Toggle font-awesome icon on click in react
- React using refs for child components
- when I hit yarn run dev . it shows 'next' is not recognized as an internal or external command, operable program or batch file
- Fetch data from localstorage/Hooks and then delete them
- How to fill dropdown with JSON data in React?
- React menu toggle typeError (gsap, object is not extensible)
- Trying to make icons hide/show - React
- can we able to specify on click on the component definition itself?
- Pass props to axios hook that implements react suspense
- Unhandled Rejection (TypeError): result.push is not a function
- Why is my fetched data not appearing in my React hooks component?
- CANNOT POST /auth/is-verify - Unexpected token < in JSON at position 0
- single-spa Micro front End application to be consumed in legacy web application which is not based on single-spa and root config
- Simulate change on input does not call a function
- Material ui dark mode reset when page refreshing?
- React App showing blank page after deploy
- Convert const function code from JSX to TSX
- How to validate two password fields with Joi in TS React?
- next JS apollo Link change clears query, have to refresh page for query to run
- Calling a asynchronous function inside getDerivedStateFromProps in React
- I want to change the value of the state with the next values from an array
- Property 'current' does not exist on type '((instance: HTMLDivElement | null) => void) | RefObject<HTMLDivElement>'
- Warning: Each child in a list should have a unique "key" prop. Key prop doesn't show when inspect element
- SetTimeout Behaving weirdly in ReactJS
- event.Target value is null for react form using hooks to handle change
- npm run build not adding Spring Boot context path
- ReactJS - add delete buttons to items displayed with map()
- React, update and detect localStorage changes with a custom hook across different components
- dispatch multiple actions with redux-observable