score:9
Accepted answer
i think the issue is here,
//input is an empty tag and you have provided submit as children here
<input type="submit">submit</input>
it should be simply this,
<input type="submit" value="submit" />
score:3
ravibagul91's answer is correct. input
is self-closing element. you cannot have children in it.
alternatively, you may use button:
<button type="submit">submit</button>
to this:
<input type="submit" value="submit" />
Source: stackoverflow.com
Related Query
- Facing issue while adding radio button in react - input is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`
- Error: input is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`
- ReactJs: input is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`
- Getting the error 'input is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`'
- Error: Error: input is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`. no solution i found
- Gatsby: img is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`
- img is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`
- Reactjs Warning: input is a void element tag and must not have `children` or use `props.dangerouslySetInnerHTML`. Check the render method of null
- Router link giving warning " link is a void element tag and must not have `children` or use `props.dangerouslySetInnerHTML`."
- Is the use of the <form> tag necessary in ReactJS that have HOC input tags that handle form-esque events and behaviour?
- How do I use the error prop and css for Input API of Material UI with context
- Getting uncought error: input is a void element tag while using React
- Have an input with validation for email, trying to clear out error message and grey out input on click of checkbox
- React JSX expressions must have a parent element error when adding a second <div>
- How can i store the value of a React input element and use it in some other elements
- How can I take a value from an input tag in a TSX component, and use that value in a Node JS file in a different directory?
- I'm using a useDispatch custom hook and getting this error in my test: Actions must be plain objects. Use custom middleware for async actions
- I have a array of objects containing images and documents, I want to check the mime_type and pick the first element (React) to display in <img> tag
- Why this error is showing: "A valid React element (or null) must be returned. You may have returned undefined"
- Use a ref to a DOM element both in parent and children components
- Error Element type is invalid: forgot to export your component from the file it's defined in, or you might have mixed up default and named imports
- How to tag an element and use this tag or id later
- What does the error "JSX element type '...' does not have any construct or call signatures" mean?
- SVG use tag and ReactJS
- "React.Children.only expected to receive a single React element child" error when putting <Image> and <TouchableHighlight> in a <View>
- Why do I get the error "expressions must have one parent element", how do I fix this?
- 'A valid React element (or null) must be returned' error with one of the component in ReactJS
- HTML5 video tag : Can't use relative height and properly place Controls
- A valid React element (or null) must be returned. You may have returned undefined, an array or some other invalid object
- Can someone give proper explanation for ref vs controlled input and use case for state variable in react?
More Query from same tag
- how can i access current location from web-page in react native webview
- React Redux: How to pass specific object prop from store to child component?
- JWT & client and server time
- Edit user information in React
- Get Geocoder address search value to update state in App.js (with react-map-gl-geocoder, mapbox-gl and react-map-gl)
- How to set state based on document.body but before render (react)
- GraphQL filter search query returns below error
- Module not found when import .jsx file
- How to get data from two endpoints in 1 component?
- Getting Index of onClick target with ReactJs
- Creating an SVG Sprite component with ejected create-react-app
- How to handle React form errors gracefully
- React Hooks like ComponentDidMount, not using render counts
- How can I show sorting icons all the time and with blue color for current sorting column in react material-table
- Typescript RefForwardingComponent not working
- Reactjs Javascript if/else not working correctly
- React UseEffect Hook - value updates within hook but not within body of component
- removing empty array objects from an array in javascript and react
- How to group table in reactjs?
- Problem with reducer function in useReducer hook
- How to Style specific/single Item or a Component using Custom Css in React Js?
- How can I mock default createHook and named createHook exports?
- React useEffect to fetch data not finished yet when try to sort data using React Router useSearchParams
- Where is a best place to make API call using React, Redux-thunk?
- how to access state of checkboxes in ReactJS?
- Removing unwanted tags from JSON response
- How to prevent UUID from changing state when using copy-to-clipboard function?
- splicing an array from objects resets the whole object
- Get Message From Kafka, send to Rsocket and Receive it from React client
- React infinite calendar -- Save multiple dates