https://kotlinlang.org logo
#redux
Title
# redux
r

Robert Jaros

01/31/2023, 10:00 AM
ActionTypes
interface has been changed from public to internal and KVision redux module no longer compiles. Not mentioned in the changelog.
Without accessing it, there is no simple way to check if the reducer is called with real action or with this special "action like" object. The only way is casting (with
as?
).
Perhaps I should try new TypedStore
Hmm the typedReducer still just checks the type of the action, so it's probably not different than casting with
as?
b

Big Chungus

01/31/2023, 11:52 AM
My bad, did not expect anyone to actually use it. I'll make it public in the hotfix release letter today
Thanks for raising this!
r

Robert Jaros

01/31/2023, 12:00 PM
I'm playing with TypedStore and almost get it working ;)
But I've got a problem with thunk.
TypedStore
allows only dispatch of strict
Action
b

Big Chungus

01/31/2023, 12:03 PM
Yeh, thunks don't work with typed dispatcher. If you still want typed store with thunks you can use myStore.store.dispatch
Which is the underlying untyped store dispatcher
r

Robert Jaros

01/31/2023, 12:07 PM
Ok, got it working. So no need to change ActionTypes just for me 😉 I'll just leave the old kvision redux store with casting, deprecate it and implement new based on TypedStore.
b

Big Chungus

01/31/2023, 12:18 PM
Awesome. Can you drop a link to your changes once they're pushed? Curious to see how you've solved it.
let me know if you have any additional comments
5 Views