-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
in yew version = "0.21.0" and yewdux = "0.9.3" error will generated #61
Comments
The Yew version needs to be updated. Should have some time soon to release a fix |
From what I found out, updating There has been some breaking changes, see: yewstack/yew#3289. I'm receiving other error, let me quickly give a sample: #[derive(Clone, Debug, Default, PartialEq, yewdux::store::Store)]
pub struct StateSprites(RefCell<HashMap<String, SpriteData>>);
pub enum SpritesManagerMsg {
SpritesInjected(Rc<StateSprites>),
}
pub struct SpritesManager {
_state_listener: Dispatch<StateSprites>,
state: Rc<StateSprites>,
element: Element,
}
impl SpritesManager {
const ID: &'static str = "svg-sprites";
}
impl yew::Component for SpritesManager {
type Message = SpritesManagerMsg;
type Properties = ();
fn create(ctx: &yew::Context<Self>) -> Self {
let cb = ctx.link().callback(Self::Message::SpritesInjected);
let dispatch = Dispatch::<StateSprites>::subscribe(cb);
// Redacted to for simplification
}
// Rest is redacted to for simplification
} I'm receiving this error message on the: Diagnostics:
1. expected a `std::ops::Fn<(std::rc::Rc<utils::sprites::store::StateSprites>,)>` closure, found `yew::Callback<std::rc::Rc<utils::sprites::store::StateSprites>>`
the trait `std::ops::Fn<(std::rc::Rc<utils::sprites::store::StateSprites>,)>` is not implemented for `yew::Callback<std::rc::Rc<utils::sprites::store::StateSprites>>`
the trait `yewdux::subscriber::Callable<S>` is implemented for `yew::callback::Callback<std::rc::Rc<S>>`
required for `yew::Callback<std::rc::Rc<utils::sprites::store::StateSprites>>` to implement `yewdux::subscriber::Callable<utils::sprites::store::StateSprites>` [E0277]
2. required by a bound introduced by this call [E0277] |
Any updates? I am too getting the same error. |
in use_store
let (store, dispatch):(Rc,Dispatch) = use_store::();
Error: the trait bound
impl yew::functional::hooks::Hook<Output = (Rc<store::Store>, yewdux::dispatch::Dispatch<store::Store>)> + '_: Hook
is not satisfiedthe trait
Hook
is implemented forBoxedHook<'_, T>
The text was updated successfully, but these errors were encountered: