Skip to content

Typescript error when trying to call action from getter #450

Discussion options

You must be logged in to vote

This is rather intentionally left out because getters being computed properties they should not have side effects and therefore not call actions. It will work because this is the store but it isn't typed with the existing actions.

If you want to extract code into a function, it should rather be a regular function that takes as an argument whatever is needed to compute a value

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@simshaun
Comment options

@zh-pan
Comment options

Answer selected by simshaun
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants