and when i add it, my "AllBadgeActionSuccess" is never called
Christian Tietze
@DivineDominion
Sorry, I don't know the async/await stuff here, and that's clearly not a ReSwift problem but something with the concurrency, so I suggest you ask somewhere where more folks hang around for general Swift questions to increase your chances
Mehreen7
@Mehreen7
oh okay thank you so much for your time
Christian Tietze
@DivineDominion
hope that the op_5 thing I pointed out still helps!
Mehreen7
@Mehreen7
Yes ! :) have a good day !
Marco Boerner
@marcoboerner
Hi there! I've just started using the SwiftUI branch of ReSwift. I was using my own Redux implementation before but ran into several issues with the observers. Does anyone know if the SwiftUI branch has a way to filter the observed state? I know SwiftUI should take care of deciding which parts of the view to redraw but it doesn't seem to work very well. Using a single state always causes my whole view to be redrawn and other undesired behaviour. @mjarvis Do you have any information to that? :)
@marcoboerner Sounds like you've found what you're looking for! I'm sorry I've been unable to formalize it more but taking an approach near the bottom of ReSwift/ReSwift#455 should do what you need :)
I'd love to get a second pair of eyes to talk about my ReSwift approaches in 2 apps eventually. If a ReSwift pro is available for hire for an hour here and there, please email :) https://christiantietze.de/contact/
Malcolm Jarvis
@mjarvis
@DivineDominion Happy to help. send me a dm in the ios slack or something to get in touch.
Working with ExpectThunk and running into an issue.
So I have a thunk that conditionally dispatches another thunk.
But Thunks don't play nicely with the .dispatches() assertion
I could breakout out the core functionality into a separate function, but that creates a route to start calling side-effects without going through the thunks.
Put another way: I am testing thunk A which can dispatch thunk B. Asserting that A dispatches B with ExpectThunk().dispatches() doesn't work and it gets in the way of asserting other dispatches() that occur after B is dispatched.
Perhaps I'm thinking about it all wrong and I shouldn't be dispatching thunks from thunks?
Daniel Bergquist
@BergQuester
Just found and tried the .dispatches(dispatch:) function to use a custom dispatch function to assert. That allows me to test thunk B.
Carryon. :-)
_
Christian Tietze
@DivineDominion
@BergQuester I haven't tested dispatching thunks from within thunks, but it sounds like a common-enough use case. Would it make sense to add an example to the README?