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, {Component} from 'react'; | |
const List = props => ( | |
<ul> | |
{ | |
props.itmes.map((item, index) => <li key={index}>{item}</li>) | |
} | |
</ul> | |
); |
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, { Component } from 'react'; | |
import LifeCycle from './LifeCycle'; | |
class App extends Component { | |
constructor(props) { | |
super(props); | |
this.state = { | |
counter: 0 | |
}; | |
this.incrementCounter = this.incrementCounter.bind(this); |
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, { Component } from 'react'; | |
class App extends Component { | |
constructor(props) { | |
super(props); | |
this.state = { | |
clicks: 0, | |
show: true | |
}; | |
this.IncrementItem = this.IncrementItem.bind(this); |
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
package main | |
import ( | |
"fmt" | |
"strconv" | |
) | |
// Always make sure to use the variables you have declared | |
// otherwise the build fails |