Last active
February 10, 2017 07:58
-
-
Save dannyid/b11c1820a2d741e00b4cc23d85b2dc49 to your computer and use it in GitHub Desktop.
Revisions
-
dannyid revised this gist
Feb 10, 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,7 +1,7 @@ __Updating Deep Immutable Object__ ```javascript let newVersion = { language: 'Default Language', // Set default for unspecified properties ...previousVersion, name: 'New Name', // Override the name property address: { -
dannyid revised this gist
Feb 10, 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,7 +1,7 @@ __Updating Deep Immutable Object__ ```javascript let newVersion = { language: 'English', // Overridable default for unspecified properties ...previousVersion, name: 'New Name', // Override the name property address: { -
dannyid revised this gist
Feb 10, 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,10 +1,10 @@ __Updating Deep Immutable Object__ ```javascript let newVersion = { country: 'United States', // Overridable default for unspecified properties ...previousVersion, name: 'New Name', // Override the name property address: { ...previousVersion.address, zipCode: '99999' // Update nested zip code }, -
dannyid revised this gist
Feb 10, 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 @@ -9,7 +9,7 @@ let newVersion = { zipCode: '99999' // Update nested zip code }, items: [ {title: 'New First Item'}, // Add an item to the beginning of items ...previousVersion.items, {title: 'New Last Item'} // Add an item to the end of items ], -
dannyid revised this gist
Feb 10, 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 @@ let newVersion = { zipCode: '99999' // Update nested zip code }, items: [ {title: 'New First Item'} // Add an item to the beginning of items ...previousVersion.items, {title: 'New Last Item'} // Add an item to the end of items ], }; -
dannyid revised this gist
Feb 10, 2017 . 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 @@ -4,12 +4,14 @@ let newVersion = { ...previousVersion, name: 'New Name', // Override the name property address: { country: 'United States', // Overridable default for unspecified properties ...previousVersion.address, zipCode: '99999' // Update nested zip code }, items: [ ...previousVersion.items, {title: 'New Item'} // Add an item to the list of items ], }; ``` -
Danny revised this gist
Jun 21, 2016 . 1 changed file with 8 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 @@ -3,7 +3,13 @@ __Updating Deep Immutable Object__ let newVersion = { ...previousVersion, name: 'New Name', // Override the name property address: { ...previousVersion.address, zipCode: '99999' // Update nested zip code }, items: [ ...previousVersion.items, {title: 'New Item'} // Add an item to the list of items ] }; ``` -
Danny revised this gist
May 11, 2016 . No changes.There are no files selected for viewing
-
Danny created this gist
May 11, 2016 .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,9 @@ __Updating Deep Immutable Object__ ```javascript let newVersion = { ...previousVersion, name: 'New Name', // Override the name property address: { ...previousVersion.address, zipCode: '99999' } // Update nested zip code items: [...previousVersion.items, { title: 'New Item' }] // Add an item to the list of items }; ```