We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
with this state setup
import { createReducer, createStatePaths } from 'redux-updaters'; export type AppState = { menuOpen: boolean; }; const defaultState: AppState = { menuOpen: false, }; export const app = createStatePaths(defaultState); export const appReducer = createReducer<AppState>(defaultState, 'app');
I am able to use for example:
import { app } from '_redux/app'; ... dispatch(update(app.menuOpen, true));
however if I try this:
import { app } from '_redux/app'; ... dispatch(toggle(app.menuOpen));
I get the error Toggle: menuOpen is not a boolean However, when I try
Toggle: menuOpen is not a boolean
dispatch(toggle('app.menuOpen'));
it does work
so it seems the typecheck is unable to handle state trees
The text was updated successfully, but these errors were encountered:
No branches or pull requests
with this state setup
I am able to use for example:
however if I try this:
I get the error
Toggle: menuOpen is not a boolean
However, when I try
it does work
so it seems the typecheck is unable to handle state trees
The text was updated successfully, but these errors were encountered: