Last active
July 21, 2017 21:24
-
-
Save glortho/81a14b0fef58e01f799bb35d62f28f42 to your computer and use it in GitHub Desktop.
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
import React from 'react' | |
import { apiDecorator } from 'jetset' | |
const users = apiDecorator({ | |
url: "https://jsonplaceholder.typicode.com", | |
users: "/users" | |
}) | |
@users | |
export default class UsersDecorated extends React.Component { | |
render() { | |
const { list } = this.props.users; | |
return ( | |
<span>{ list().data.length } Users</span> | |
) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment