Create the next immutable state by mutating the current one
-
Updated
Sep 12, 2020 - JavaScript
Also for iPad.
This should fail because otherNum is not part of the State interface:
interface State {
num: number
}
export const initialState: State = {
num: 0
};
export const appsReducer = createReducer(initialState, handleAction => [
handleAction(actions.getApps.success, () => ({
num: 0,
otherNum: 0 // adding this property should trigger a warning
})),
]);Add a description, image, and links to the reducer topic page so that developers can more easily learn about it.
To associate your repository with the reducer topic, visit your repo's landing page and select "manage topics."
what is prefer way to add relation and remove relation? I found example as below, but I did't find any document about the two methods.