mocoding-software/redux-automata

Typescript definition & non serializable state

Closed this issue · 3 comments

Hello,
Thanks for this project. I really like how the fsm must be implemented with fluent syntax.

I have found 2 issues when i'm trying to using automata in my project :

Thanks in advance.

Hi, thanks for your feedback. Version 2.6.1 has types fixed.
I understand the issue with canInvoke. I am working on a PR to solve that.

@michael-haberzettel Please review attached PR #9. I am removing state.canInvoke in favor of action.isInvokable. If that works for you - please let me know and I merge it in.

@connect(
    (state: ResponseState) => ({
        response: state,
       canRefresh: Refresh.isInvokable(state) // <<<<<< EXAMPLE
    }),
)

Hello @offbeatful

Thanks for version 2.6.1with typing definitions, I will continue the discussion in the associated PR.