Closed cristian-sima closed 5 years ago
@tonyhb
It seems it is difficult to modify it. I replace redux-ui
with this simple reducer:
// @flow
const reducer = (state : any, action : any) => {
const { payload } = action;
switch (action.type) {
case "UPDATE_BOARD":
return state.set(payload.key, payload.value);
case "CLEAR_BOARD":
return state.delete(payload.key);
default:
return state;
}
};
const getFromBoard = (state : any, key : string) => (
state.getIn([
"board",
key,
])
);
export const selectors = {
getFromBoard,
};
export default reducer;
fix #89