score:0
i think your default onsubmit action is called from react.js form.
add attribute type to button element inside element.
<form>
<button onclick={this.submitform}>submit</button> {/* this will trigger twice, remove this. */}
<button type="button" onclick={this.submitform}>submit</button> {/* add type="button" to prevent default action */}
</form>
Source: stackoverflow.com
Related Query
- integration failed with react and php for post data
- react native post form data with object and file in it using axios
- React - Axios POST form data with files and strings
- How to do Server Side Rendering in React With React Loadable and Fetching Data for Components (Like Next.js)?
- Request failed with status code 500 error. When making form post of multiForm data in React
- React and Firebase connection for get data and post data
- Iterate through a for loop with the help of react and read out the data record
- failed to send and recieve form data object with react and nodejs
- How to perform a post request with axios on React and pass your data as FormData?
- Using React and trying to post data with axios- coming up empty object
- Building hybrid React apps for iOS and Android with native performance
- React with MVC data annotations and unobtrusive validation
- React and Socket.io: Able to get initial data - but view doesn't update when a new post comes in
- Using Jquery and Bootstrap with Es6 Import for React App
- Waiting for render events with Selenium and React
- React Native start failed with error code -4094 how to solve this ONCE for ALL?
- react with Rails 5, getting CSRF error for post with axios
- Using different API url for development and production with React and axios
- Post an object with fetch using react js and express API server
- How to post data in php via react js
- Create React App with TypeScript and NPM Link: Enums causing Module parse failed
- How to create a widget with react for integration in other react app?
- Why is my React component render called twice, once without data and then later with data, but too late exception?
- Sync queryParameters with Redux state and react router for function components
- Getting keyboard navigation to work with MUI Autocomplete and SimpleBar for react
- Webpack 2 configuration for Tree shaking and lazy loading with System.import on React project
- React Router v5 accompanied with Code Splitting, and Data Prefetching with the use of Server Side Rendering
- React native buld failed with the following message Failed to list versions for com.facebook.react:react-native
- redux react strategy with async data and interaction
- React - Combine data returned two api calls and set state of an array with these values
More Query from same tag
- Fixed div responsive in css
- while compiling my react project am facing the issue with module not found
- how to make increasing arrow and decreasing arrow in React for sorting
- When clicking inside the block, an external click is triggered
- How do I add an svg icon to Material ui helper text generated by Formik and Yup
- MailChimp and Stripe Integration for React
- How do I add column sort functionality to my table?
- Reactjs - how to append a font-awesome icon to ref
- No translation for MenuItemLink's primaryText in react-admin
- useEffect efficiency in Star Wars API
- Javascript Convert an Object to a URL
- How can i send this login request each minute?
- Invariant Violation: Minified React error #200;
- How to save response to localStore with Redux Thunk?
- React-How to display make objects loop in react
- Component is not rendering in react js
- ReactJS Accessing Nested Objects
- React router not showing a page
- Gatsby not loading useEffect function in production
- How I can add Input text and show in li that created by map in react
- Where to put static files in webpack development
- How might I reset state of just one reducer when I have multiple reducers and prevent reload on state reset of just one reducer
- Get data in component tree using RTK Query
- Solana React TypeError: this.wallet.signTransaction is not a function
- Manager line-height per font-size with styled system
- how can i make this function?(same result check)
- Of two equal JSON objects, accessing values in javascript works in one case, the other returns undefined
- How to solve unexpected antd datepicker behavior
- React: use or not to use Immutable.js
- Button is moved out of the visible content