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
class CatsGetInit { | |
get static type () { | |
return `prefix/${this.name}` | |
} | |
constructor () { | |
this.type = this.constructor.type | |
} | |
} | |
const reducerCats = (state, action) => { | |
switch (action.type) { |
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
class CatsGetInit { | |
constructor() { | |
this.type = this.constructor.name | |
} | |
} | |
const reducerCats = (state, action) => { | |
switch (action.type) { | |
case CatsGetInit.name: | |
return { | |
...state, |
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
class CatsGetInit {} | |
class CatsGetSuccess { | |
constructor(responseData) { | |
this.payload = responseData | |
} | |
} | |
class CatsGetError { | |
constructor(error) { | |
this.payload = error | |
this.error = true |
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
class CatsGetInit extends ActionStandard {} | |
class CatsGetSuccess extends ActionStandard {} | |
class CatsGetError extends ActionStandard {} | |
const reducerCatsLoading = createReducer( | |
false, | |
reducerLoadingMap(CatsGetInit, CatsGetSuccess, CatsGetError), | |
) | |
const reducerCatsData = createReducer(undefined, { | |
[CatsGetSuccess.type]: () => action.payload, |
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
const reducerLoading = (actionInit, actionSuccess, actionError) => ( | |
state = false, | |
action, | |
) => { | |
switch (action.type) { | |
case actionInit.type: | |
return true | |
case actionSuccess.type: | |
return false | |
case actionError.type: |
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
# don't ever lint node_modules | |
node_modules | |
# don't lint build output (make sure it's set to your correct build folder name) | |
dist | |
# don't lint nyc coverage output | |
coverage |
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
const actionTypeSpendInit = 'SPEND_INIT' | |
const actionTypeSpendSuccess = 'SPEND_SUCCESS' | |
const actionTypeSpendError = 'SPEND_ERROR' | |
class ActionSpendInit { | |
type = actionTypeSpendInit | |
constructor(public payload) | |
} | |
class ActionSpendSuccess { | |
type = actionTypeSpendSuccess |
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
class Family extends React.Component { | |
state = { funds: 100 } | |
render () { | |
return <Dad name={this.state.funds}/> | |
} | |
} | |
class Dad extends React.Component { | |
render () { |
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
npm info it worked if it ends with ok | |
npm verb cli [ '/usr/bin/node', '/usr/bin/npm', 'ci', '-ddd' ] | |
npm info using [email protected] | |
npm info using [email protected] | |
npm verb npm-session 1ebf26668331fae8 | |
npm info prepare initializing installer | |
npm verb prepare starting workers | |
npm verb prepare installation prefix: /usr/src/verity-ui/server | |
npm verb prepare using package-lock.json | |
npm verb checkLock verifying package-lock data |
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
npm info it worked if it ends with ok | |
npm verb cli [ '/usr/bin/node', '/usr/bin/npm', 'ci', '-ddd' ] | |
npm info using [email protected] | |
npm info using [email protected] | |
npm verb npm-session 1ebf26668331fae8 | |
npm info prepare initializing installer | |
npm verb prepare starting workers | |
npm verb prepare installation prefix: /usr/src/verity-ui/server | |
npm verb prepare using package-lock.json | |
npm verb checkLock verifying package-lock data |