• Register
0 votes

Problem :

Facing following strange issue
input is a void element tag and must neither have `children` nor use `dangerouslysetinnerhtml`.
6 5 3
6,930 points

Please log in or register to answer this question.

1 Answer

0 votes

Solution :

As per the error input tag should not have any children, please take the label out off input closure tag

render() {
    let radioid = this.props.radioid;
    return (
        <div className="row">
        {this.props.options.map(function(option) {
            return (
            <div key={radioid} className="column">
                <input type="radio" name={radioid} value={option}/>
9 7 4
38,600 points

Related questions

0 votes
1 answer 38 views
Problem: why I get this error: input is a void element tag and must neither have `children` nor use `dangerouslysetinnerhtml`..
asked Mar 6 Wafa Abu Yousef 6.1k points
0 votes
1 answer 66 views
Here is a code example showing how to use hooks: import { useState } from 'react'; function Example() { // Declare a new state variable, which we'll call "count" const [count, setCount] = useState(0); return ( <div> <p>You clicked {count} times</p> <button onClick={( ... the following installed packages "react": "^16.7.0-alpha.2", "react-dom": "^16.7.0-alpha.2" Any explanations and fixes to this?
asked Jan 23 khaled 280 points
1 vote
1 answer 5 views
Problem : I've just started learning React The tutorial I was following uses React-Router 2.0.0, but on my desktop I'm using 4.1.1. Here is my code: var React = require('react'); var ReactDOM = require('react-dom'); var { Route, Router, IndexRoute } ... ') ); When run that code I got this error: Uncaught TypeError: Cannot read property 'pathname' of undefined at new RouterHow can this be solved?
asked 4 days ago Shovo210 13.2k points
0 votes
1 answer 55 views
I have the following index.js file: const React = require('react'); let App = React.createClass({ render: () => { return ( <div> Hello,this is jsx! </div> ); } }); module.exports = App; This code renders the following HTML: <!DOCTYPE html> ... [as engine] (/Users/xinhengs/Desktop/QunarDevs/qact/server/node_modules/express-react-views/index.js:46:32) Please help me figure out what&rsquo;s going on.
asked Jan 23 khaled 280 points
0 votes
2 answers 528 views
Problem : I am trying to learn React JS. I have written a code for component . I also have the data that I get from a Data Base, and whose current state (myDB) I dispatch.I am trying to use data from myDB object and then want to display some of the ... a collection of children, use an array instead or wrap the object using createFragment(object) from the React add-ons How to fix this issue ?
asked Feb 22, 2020 mphil 2.3k points
0 votes
1 answer 11 views
Problem: this element neither has attached source nor attached javadoc and hence no javadoc could be found.
asked Feb 23 Muneeb Saadii 125k points
0 votes
1 answer 37 views
Problem syntax error: adjacent jsx elements must be wrapped in an enclosing tag.
asked Feb 11 charles mathews 5.5k points
0 votes
2 answers 1.2K views
Problem : Facing below error: Unhandled Rejection (Error): Actions must be plain objects. Use custom middleware for async actions. I wanted to add comments with all posts. So when fetch posts are run I want to call fetch comment API for every post. export function ... API.fetchComments(postAllId).then(comments => {     return {       type: BIND_COMMENTS,       comments,       posAlltId     }  }) }
asked Jan 17, 2020 jwilliam 3.9k points
0 votes
1 answer 2 views
Problem: Can anyone tell me the solution of it? .. invariant violation: target container is not a dom element.
asked Apr 2 Ifra 24.4k points
0 votes
2 answers 364 views
Problem : I often face below error after making the trivial React example page: &ldquo;Uncaught Error: Invariant Violation: _registerComponent(...): Target container is not a DOM element.&rdquo; Below is my code: /** The @jsx React.DOM */ 'use strict'; var MyReact = require('react'); ... > <head>  <script src="/mybundle.js"></script> </head> <body> </body> </html> What does the above error mean?
asked Jan 7, 2020 alecxe 7.5k points