A Pen by Yerlin Matu on CodePen.
Created
May 17, 2017 22:11
-
-
Save YerlinMatu/bd7c1b146e343b09bcc14af097537b86 to your computer and use it in GitHub Desktop.
Even or Odd numbers React
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<main id="app"></main> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Operacion = React.createClass({ | |
render:function(){ | |
if(this.props.numero % 2 == 0){ | |
return <h1>¡Wow es un par!</h1> | |
}else { | |
return <h1>No es par</h1> | |
} | |
} | |
}); | |
ReactDOM.render(<Operacion numero="9"/>, document.getElementById('app')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.4.2/react.min.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.4.2/react-dom.min.js"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*{ | |
font-family:arial; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Componente de números pares o impares.
#React.js