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
class BinaryTreeNode { | |
constructor(value) { | |
this.value = value; | |
this.left = null; | |
this.right = null; | |
} | |
insertLeft(value) { | |
this.left = new BinaryTreeNode(value); | |
return this.left; |
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 placeholderReducer = (state = null) => state; | |
let reducers = {}; | |
export default { | |
getReducers() { | |
return { ...reducers }; | |
}, | |
// Preserve initial state for not-yet-loaded reducers | |
getInitialReducer(initialReducers, initialState) { | |
const reducerNames = Object.keys(initialReducers); |