Last active
September 10, 2016 16:27
Revisions
-
jordwalke revised this gist
Jan 29, 2014 . 1 changed file with 3 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 @@ -39,4 +39,6 @@ var PeopleList = React.createClass({ * - Just expressions. * - Just plain Arrays and Objects. * - React JavaScript: Just like you've always done it. */ // Fork at: https://github.com/facebook/react -
jordwalke revised this gist
Jan 29, 2014 . 1 changed file with 8 additions and 4 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,8 +1,12 @@ /** * ReactJS: JavaScript like you've always done it. * * This example renders your top ten most followed friends/followers, `filter`ing * only your favorites, and putting a star on all verified accounts. * * With ReactJS, any time your data changes, the UI is always brought up to date * automatically. If friends length changes, or followCount - it always shows what * `render` describes. */ var PeopleList = React.createClass({ -
jordwalke revised this gist
Jan 29, 2014 . 1 changed file with 21 additions and 17 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,8 +1,9 @@ /** * Renders your top ten most followed friends/followers, `filter`ing only your favorites, * putting a star on all verified accounts. * Any time your data changes, the UI is always brought up to data automatically. * If friends length changes, or followCount - it always shows what `render` describes. */ var PeopleList = React.createClass({ render: function() { @@ -20,15 +21,18 @@ var PeopleList = React.createClass({ } }); /** * Instead of making you set up "Bindings" to models: * - React uses plain JavaScript *functions* to bind outputs to inputs. * * Instead of making you set up "computed values": * - React uses plain JavaScript *expressions* to compute values. * * Instead of making you use "collections": * - React uses plain JavaSctript *Arrays* to model changing lists. * * - Just functions. * - Just expressions. * - Just plain Arrays and Objects. * - React JavaScript: Just like you've always done it. */ -
jordwalke revised this gist
Jan 29, 2014 . No changes.There are no files selected for viewing
-
jordwalke revised this gist
Jan 29, 2014 . 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 @@ -14,7 +14,7 @@ var PeopleList = React.createClass({ .sort(function(one, two) {return one.followCount - two.followCount;}) .slice(0, 10) .map(function(person) { return div({className: person.isVerified ? 'star' : 'gray'}, person.name); }) ); } -
jordwalke revised this gist
Aug 27, 2013 . 1 changed file with 2 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,14 +1,8 @@ // Renders your top ten most followed friends/followers, `filter`ing only your favorites, // putting a star on all verified accounts. // Any time your data changes, the UI is always brought up to data automatically. // If friends length changes, or followCount - it always shows what `render` describes. var PeopleList = React.createClass({ render: function() { -
jordwalke revised this gist
Aug 27, 2013 . No changes.There are no files selected for viewing
-
jordwalke revised this gist
Aug 27, 2013 . 1 changed file with 2 additions and 2 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 @@ -33,8 +33,8 @@ var PeopleList = React.createClass({ // React uses plain JavaScript *expressions* to compute values. // Instead of making you use "collections": // React uses plain JavaSctript *Arrays* to model changing lists. // - Just Functions. Just expressions. Just Arrays. Just JavaScript. // - Just like you've always done it. -
jordwalke revised this gist
Aug 27, 2013 . 1 changed file with 5 additions and 4 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 @@ -28,12 +28,13 @@ var PeopleList = React.createClass({ // Instead of making you set up "Bindings" to models: // - React uses plain JavaScript *functions* to bind outputs to inputs. // Instead of making you set up "computed values": // React uses plain JavaScript *expressions* to compute values. // Instead of making you use "collections": // React uses plain JavaSctript *arrays* to model changing lists. // - Just regular Arrays. Just Functions. Just JavaScript. // - Just like you've always done it. -
jordwalke revised this gist
Aug 27, 2013 . 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 @@ -26,7 +26,6 @@ var PeopleList = React.createClass({ } }); // Instead of making you set up "Bindings" to models: // - React uses plain JavaScript *functions* to bind outputs to inputs. // Instead of making you set up "computed values": -
jordwalke revised this gist
Aug 27, 2013 . 1 changed file with 13 additions and 3 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 @@ -10,9 +10,6 @@ // time and the UI will always be updated, and React computes the minimum set // of DOM mutations needed to make it happen. var PeopleList = React.createClass({ render: function() { var friends = this.props.friends; @@ -28,3 +25,16 @@ var PeopleList = React.createClass({ ); } }); // No bindings or "computed values" to model. // Instead of making you set up "Bindings" to models: // - React uses plain JavaScript *functions* to bind outputs to inputs. // Instead of making you set up "computed values": // React uses plain JavaScript *expressions* to compute values. // Instead of making you use "collections": // React uses plain JavaSctript *arrays* to model changing lists. // // Just like you've always done it. // // Just regular arrays. Just Functions. Just JavaScript. -
jordwalke renamed this gist
Aug 27, 2013 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
jordwalke created this gist
Aug 27, 2013 .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,30 @@ // Renders your top ten most followed friends/followers, `filter`ing only your favorites, // putting a star on all verified accounts. // When using the React API, any time any of the data changes through state // updates, the `render` function will always be satisfied. If new followers // or friends are added, the UI automatically updates. If the ranking by // followCount changes, the ordering of rendering automatically moves // nodes to their proper place in the ordering. If a person becomes "verified" // they automatically get a star. Any of this could happen at any point in // time and the UI will always be updated, and React computes the minimum set // of DOM mutations needed to make it happen. // No bindings to automatically setup. No dependency tracking to configure. // Just JavaScript. Just regular arrays. Just Functions. var PeopleList = React.createClass({ render: function() { var friends = this.props.friends; var followers = this.props.followers; return div({className: 'list'}, friends.concat(followers) .filter(function(person) {return person.isFavorite;}) .sort(function(one, two) {return one.followCount - two.followCount;}) .slice(0, 10) .map(function(person) { return div({className: person.isVerified ? 'star' : 'gray'}); }) ); } });