Ad

React:- It's Not Rendering My HTML

- 1 answer

I was trying to make simple HTML form with input type radio and submit button, but don't know why it's not rendering my HTML even not showing any error on console as well.

here is jsfiddle for it : JsFiddle

Ad

Answer

React render method must have only one parent element your are trying to load multiple parent method check this code Check here

your RadioOptionGroup should be like

 var RadioOptionGroup = React.createClass({
  render: function(){
    return(
      <div>
      {this.props.options.map(function(option){
        return(
        <RadioOption value={option.value}>{option.label}</RadioOption>
      );
  })}
  </div>
      );
  }
});
Ad
source: stackoverflow.com
Ad