This file contains hidden or 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
class UserListContainer extends React.Component { | |
constructor () { | |
super(); | |
this.state = { | |
users: [] | |
}; | |
} | |
componentDidMount () { |
This file contains hidden or 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
class UserList extends React.Component { | |
render () { | |
return ( | |
<ul> | |
{this.props.users.map(user => <li key={user.id}>{user.name}</li>)} | |
</ul> | |
); | |
} | |
} |
This file contains hidden or 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
class UserList extends React.Component { | |
constructor () { | |
super(); | |
this.state = { | |
users: [] | |
}; | |
} | |
componentDidMount () { | |
fetch('/users').then(users => { |
This file contains hidden or 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
/* | |
The purpose of this script is to daily check Packt's Free Book offer | |
and notify via e-mail with the title of the book and link to download page | |
-> https://www.packtpub.com/packt/offers/free-learning | |
Author: Douglas Matoso - www.dmatoso.com | |
Instructions: | |
1) Create a new Google Script at http://script.google.com | |
2) Paste the code below, putting your email in the "email" var. |
NewerOlder