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
import React from 'react'; | |
import ReactDOM from 'react-dom'; | |
document.addEventListener('DOMContentLoaded', function(){ | |
class Buttons extends React.Component { | |
constructor(props){ | |
super(props); | |
let generatedTexts = []; |
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
import React from 'react'; | |
import ReactDOM from 'react-dom'; | |
document.addEventListener('DOMContentLoaded', function(){ | |
class MyCheckbox extends React.Component { | |
constructor(props){ | |
super(props); | |
this.state = { | |
isOn : false, |
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
import React from 'react'; | |
import ReactDOM from 'react-dom'; | |
document.addEventListener('DOMContentLoaded', function(){ | |
class ShopItem extends React.Component { | |
onBuyButtonClick = () => { | |
if ( typeof this.props.onBuy === 'function' ){ | |
this.props.onBuy( this.props.title ); | |
} | |
}; |
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
import React from 'react'; | |
import ReactDOM from 'react-dom'; | |
document.addEventListener('DOMContentLoaded', function(){ | |
class ButtonToClick extends React.Component { | |
handleButtonClick = () => { | |
if ( typeof this.props.onClick === 'function' ){ | |
this.props.onClick(); | |
} | |
}; |
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
import React from 'react'; | |
import ReactDOM from 'react-dom'; | |
document.addEventListener('DOMContentLoaded', function(){ | |
class CrazyDiv extends React.Component { | |
constructor(props){ | |
super(props); | |
this.state = { | |
left : '0', |
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
import React from 'react'; | |
import ReactDOM from 'react-dom'; | |
document.addEventListener('DOMContentLoaded', function(){ | |
class Nonsense extends React.Component { | |
constructor(props){ | |
super(props); | |
this.state = { | |
buttonsText : 'Klik!', |
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
import React from 'react'; | |
import ReactDOM from 'react-dom'; | |
document.addEventListener('DOMContentLoaded', function(){ | |
class ShowInfo extends React.Component { | |
render() { | |
return <h1>{ this.props.info }</h1>; | |
} | |
} |
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
import React from 'react'; | |
import ReactDOM from 'react-dom'; | |
document.addEventListener('DOMContentLoaded', function(){ | |
class TrafficLights extends React.Component { | |
constructor(props) { | |
super(props); | |
this.state = { |
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
import React from 'react'; | |
import ReactDOM from 'react-dom'; | |
document.addEventListener('DOMContentLoaded', function(){ | |
class StrobeLight extends React.Component { | |
constructor(props) { | |
super(props); | |
this.state = { |
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
import React from 'react'; | |
import ReactDOM from 'react-dom'; | |
document.addEventListener('DOMContentLoaded', function(){ | |
class TextTyper extends React.Component { | |
constructor(props){ | |
super(props); | |
this.state = { |