lmatteis / redux-statecharts

Redux statecharts
122 stars 6 forks source link

How can i deal with 'actions'(or onEntry\onExit) within components? #3

Open MEANyehoon opened 5 years ago

MEANyehoon commented 5 years ago

I run machine in Redux middleware, like redux-observable. So I have a problem:

    states: {
        'S1': {
            onEntry: ['A1'],
            on: {
                'E1': {target: 'S2', actions: ['A2']}
            }
        },
        'S2': {}
    }

'A1' is a Redux action, that's OK. But 'A2' is a component action, like addEventListener, how can i do? My English is not very good.. Thanks