git checkout <master>
git merge origin <master>
git checkout <feature>
git rebase <master>
- deal with any conflicts
git add .
git rebase --continue
git push origin <feature> --force
😎
View Portal_Teams.addTeamMember.request.js
// Portal_Teams.addTeamMember.request.js | |
{ | |
... | |
data: { | |
ClassName: 'Platform_Teams', | |
MethodName: 'addTeamMember', | |
Parameter: { | |
name: 'Name', | |
practitionerId: '0050k000000FtmGAAS', | |
clients: [ // Group and all it's entities |
View deepArrayMerge.js
// const { unionBy, isArray, merge, find } = _ | |
const deepArrayMerge = (initial, replacement, key) => unionBy(initial, replacement, key) | |
.map(item => merge({}, item, find(isArray(replacement) ? replacement : [replacement], { [key]: item[key] }))) |
View example.js
unless(booleanExpression, () => { | |
// Then callback | |
}) |
View compose.js
const compose = (...functions) => (...start) => ( | |
functions.reduce((result, f) => ( | |
(typeof result === 'object') ? f(...result) : f(result) | |
), start) | |
) | |
/** | |
* Usage |
View throttle.js
function throttle(callback, wait, immediate = false) { | |
let timeout = null | |
let initialCall = true | |
return function() { | |
const callNow = immediate && initialCall | |
const next = () => { | |
callback.apply(this, arguments) | |
timeout = null | |
} |
View git-rebase.notes.md
View revive.js
const Revived = () => { | |
createStore = (reducer) => { | |
let state | |
let listeners = [] | |
const getState = () => state | |
const dispatch = (action) => { | |
state = reducer(state, action) |
View debounce.js
function debounce(callback, wait, immediate = false) { | |
let timeout = null | |
return function() { | |
const callNow = immediate && !timeout | |
const next = () => callback.apply(this, arguments) | |
clearTimeout(timeout) | |
timeout = setTimeout(next, wait) |
View pureSplice.js
function safeSplice(array, start, deleteCount, ...replace) { | |
const removed = array.splice(start, deleteCount, ...replace) | |
return { | |
array: array, | |
removed: removed, | |
} | |
} | |
/** usage | |
const array = [1, 2, 3, 4, 5, 6] |
View reactLifecycleMethods.notes.md
Mounting
componentWillMount
componentWillMount()
setState()
can be called here and won't cause a rerender
NewerOlder