Question from the React Native (Legacy) test

Which of the following snippets are valid JSX?

Medium

###Which snippet(s) do you think are valid JSX?

Code A:
import React from "react";
class SomeComponent extends React.Component {
      render () {
            return (<Element>Some text</Element>);
      }
}
 
Code B:
import React from "react";
class SomeComponent extends React.Component {
      render () {
            return (</Element >);
      }
}
 
Code C:
import React from "react";
class SomeComponent extends React.Component {
      render () {
            return (
                <div>
                  <Element>Some text</Element>
                  <Element/>
                </div>
            );
      }
}
 
Code D:
import React from "react";
class SomeComponent extends React.Component {
      render () {
            return (
                <Element a="attribute" b={this.props.b}>Some text</Element> 
            );
      }
}
Author: RomainStatus: Published(Update)Question passed 365 times
Edit
1
Community EvaluationsNo one has reviewed this question yet, be the first!