Question from the React Native (Legacy) test

Archived

### Quel(s) snippet(s) vous semble(nt) être du JSX valid ?

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: Victor SabatierStatus: Archived(New question!)Question passed 155 times
0
Community EvaluationsNo one has reviewed this question yet, be the first!