Last active
July 21, 2017 21:24
-
-
Save glortho/81a14b0fef58e01f799bb35d62f28f42 to your computer and use it in GitHub Desktop.
Revisions
-
glortho revised this gist
Jul 21, 2017 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -9,8 +9,9 @@ const users = apiDecorator({ @users export default class UsersDecorated extends React.Component { render() { const { list } = this.props.users; return ( <span>{ list().data.length } Users</span> ) } } -
glortho revised this gist
Jun 3, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -10,7 +10,7 @@ const users = apiDecorator({ export default class UsersDecorated extends React.Component { render() { return ( <span>{ this.props.users.$list().length } Users</span> ) } } -
glortho revised this gist
May 25, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,5 @@ import React from 'react' import { apiDecorator } from 'jetset' const users = apiDecorator({ url: "https://jsonplaceholder.typicode.com", -
glortho revised this gist
May 25, 2017 . 1 changed file with 7 additions and 8 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,17 +1,16 @@ import React from 'react' import apiDecorator from 'jetset/lib/decorator' const users = apiDecorator({ url: "https://jsonplaceholder.typicode.com", users: "/users" }) @users export default class UsersDecorated extends React.Component { render() { return ( <span>{ this.props.users.$list().size } Users</span> ) } } -
glortho revised this gist
May 17, 2017 . 1 changed file with 6 additions and 7 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,18 +1,17 @@ import React from 'react'; import Api from 'jetset/api'; export const users = Component => props => <Api url="https://jsonplaceholder.typicode.com" users="/users"> <Component { ...props } /> </Api>; @users export default class UsersDecorated extends React.Component { render() { return ( <span>{ this.props.users.$list().size } Users</span> ); } } -
glortho revised this gist
May 11, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -12,7 +12,7 @@ export const sources = Component => props => export default class SourcesDecorated extends React.Component { render() { return ( <span>{ this.props.sources.$list().size } Sources</span> ); } } -
glortho revised this gist
May 3, 2017 . 1 changed file with 0 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,3 @@ import Api from 'jetset/api'; const sourcesSchema = require( '../schemas/sources' ); -
glortho created this gist
May 3, 2017 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,19 @@ import React from 'react'; import Api from 'jetset/api'; const sourcesSchema = require( '../schemas/sources' ); export const sources = Component => props => <Api url="http://localhost:3000/hub/api" sources={ sourcesSchema }> <Component { ...props } /> </Api>; @sources export default class SourcesDecorated extends React.Component { render() { return ( <span>{ this.props.sources().size } Sources</span> ); } }