You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Looking at the Typescript typings for Redux, it looks like there is no built-in way to type check calls to dispatch, etc. This looks like something that could be improved. For example you could envisage a store definition that looks something like the following:
Then, with appropriate modifications elsewhere, you could something like the following:
type MyAppActions =
| CreateTodo
| DeleteTodo
| UpdateTodo;
const store = createStore<MyAppState, MyAppActions>(myReducer);
I would be interested to hear what you think of this as an idea. In particular, is this an idea that has already been considered and rejected in the past?
The text was updated successfully, but these errors were encountered:
Looking at the Typescript typings for Redux, it looks like there is no built-in way to type check calls to
dispatch
, etc. This looks like something that could be improved. For example you could envisage a store definition that looks something like the following:Then, with appropriate modifications elsewhere, you could something like the following:
I would be interested to hear what you think of this as an idea. In particular, is this an idea that has already been considered and rejected in the past?
The text was updated successfully, but these errors were encountered: