skavan

Results 23 comments of skavan

very interesting. thx for the code. However -- it would be great to have a prop that prevented activeNotes from triggering playNote, stopNote, onPlayNoteInput, onStopNoteInput. right now, I get an...

OK - I tried! here you go: https://codesandbox.io/s/react-redux-listener-op4l7v?file=/src/App.js what's weird is that this time, lines 27,28,29 in listenerMiddleware never get called. Implies to me something about timing. To flip between...

> I'd assume it's a "wait for this state to be the case. It might already be the case or happen in the future". @phryneas -- exactly correct!

fair enough. the conditional approach above will work...

But -- does that force an immediate ONLY check (or no?). Your original form, was an either/or which is what we want the outcome to be.

By the way -- I dunno if this was implied -- by > you would have to do dispatch some action to trigger an initial check what I would really...

> - which would immediately do the check and if that fails go back to the current behaviour. perfect. but if its too much brain damage, I'm ok with the...

> Oh. I see Lenz's point - pass in a dummy action with a fake `type` field, so it at least fulfills the minimum expected contents of an action object....

> We _have_ had a couple cases where it would be nice to trigger a listener right away. **edit** What we kinda want is "when store/reducers/middleware loaded, run this listener...

and since a picture is worth a thousand words.... ![screenshot 1](https://user-images.githubusercontent.com/2557753/43427824-f209e278-9420-11e8-84b9-4e93f9569985.png) ![screenshot_2](https://user-images.githubusercontent.com/2557753/43427825-f2339456-9420-11e8-96ce-5e0cec4c83cc.png)