This file contains 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
const store = createStore(r, { | |
user: { | |
name: 'wacko', | |
age: 48 | |
}, | |
comments: ['hi', 'hola'] | |
}); |
This file contains 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
const store = createStore(r, { | |
user: { | |
name: 'wacko', | |
age: 48 | |
}, | |
comments: ['hi', 'hola'] | |
}); |
This file contains 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 { createStore } from 'redux'; | |
const store = createStore(r, { | |
user: { | |
name: 'wacko', | |
age: 48 | |
}, | |
commentCount: 2, | |
loginHistory: { | |
loginDate: '2017-01-01', |
This file contains 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 { createStore } from 'redux'; | |
const store = createStore(r, { | |
user: { | |
name: 'wacko', | |
age: 48 | |
}, | |
commentCount: 2, | |
loginHistory: { | |
loginDate: '2017-01-01', |
This file contains 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 { createStore } from 'redux'; | |
const reducer = function(state, action){ | |
if(action.type === 'CMT'){ | |
return state + action.payload; | |
} | |
return state; | |
} | |
const store = createStore(r, { |
This file contains 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 { createStore } from 'redux'; | |
// Store | |
const dataStore = createStore(r, { | |
beerlist: { | |
name: 'IPA', | |
abv: 7.4 | |
}, | |
beersOnTap: 1, | |
liveMusicHistory: { |
This file contains 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 { createStore } from 'redux'; | |
// Store | |
const dataStore = createStore(r, { | |
beerlist: { | |
name: 'IPA', | |
abv: 7.4 | |
}, | |
beersOnTap: 1, | |
liveMusicHistory: { |
This file contains 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 { createStore } from 'redux'; | |
// Store | |
const dataStore = createStore(r, { | |
beerlist: { | |
name: 'IPA', | |
abv: 7.4 | |
}, | |
beersOnTap: 1, | |
liveMusicHistory: { |
This file contains 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 { createStore } from 'redux'; | |
// Store | |
const dataStore = createStore(r, { | |
beerlist: { | |
name: 'IPA', | |
abv: 7.4 | |
}, | |
beersOnTap: 1, | |
liveMusicHistory: { |
This file contains 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
var a = { name: 'Pilsner', abv: 5.4 };// Remains untouched | |
var b = Object.assign({}, a, {abv: 6.7})// b = { name: 'Pilsner', abv: 6.7 }} | |
var a = [0, 1, 2]// Remains untouched | |
var b = a.concat(3)// b = [0, 1, 2, 3] | |
var c = a.filter((val) => != 2)// c = [0, 1, 3] | |
var a = {name: 'Dave Matthews', songs: [0, 1, 2]}// Remains untouched | |
var b = Object.assign({}, a, {name: 'Jack Johnson'});// b = {name: 'Jack Johnson', songs: [0, 1, 2]} | |
b.songs = a.songs.concat(3);// b = {name: 'Jack Johnson', things: [0, 1, 2, 3]} |
OlderNewer