Closed lukechu10 closed 3 years ago
Question
How would a use_selector
hook work? The Dispatch
returns an Rc
so it would be impossible to implement without cloning the result of the selector.
Sorry for the long wait. Just BTW I haven't tested any of this yet so none of it might work. Edit: It doesn't work yet.
This PR adds hooks in a seperate
yewdux-functional
crate for usage with function components in Yew.This is still WIP because I get an error when calling a callback
The Id of the handler: 1, while present in the slab, is not associated with a callback.
even though all functionality is properly working.Final API:
use_dispatch
which allows emitting callbacks on the store.use_store
which allows accessing the store.