function applyDiff(state, diff) {
        // Need to copy all changed paths, since jsonpatch mutates
        let copy = copyChangedPaths(state, diff);

        const newState = jsonpatch.applyPatch(copy, diff).newDocument;

        return newState;
    }
/*
     * Apply diff in a redux safe manner by not mutating existing objects.
     */
Apply diff in a redux safe manner by not mutating existing objects.
Apply diff in a redux safe manner by not mutating existing objects .
function applyDiff(state, diff) {
        let copy = copyChangedPaths(state, diff);
        const newState = jsonpatch.applyPatch(copy, diff).newDocument;
        return newState;
    }
function applyDiff ( state , diff ) { let copy = copyChangedPaths ( state , diff ) ; const newState = jsonpatch . applyPatch ( copy , diff ) . newDocument ; return newState ; }
Apply diff in a redux safe manner by not mutating existing objects.
Apply diff in a redux safe manner by not mutating existing objects .
// Need to copy all changed paths, since jsonpatch mutates