intendednull / yewdux

Ergonomic state management for Yew applications
https://intendednull.github.io/yewdux/
Apache License 2.0
319 stars 31 forks source link

Latest Yewdux won't compile #21

Closed pbspbsingh closed 2 years ago

pbspbsingh commented 2 years ago
unresolved imports `yew_agent::Agent`, `yew_agent::AgentLink`, `yew_agent::Context`
 --> $CARGO_HOME/git/checkouts/yewdux-cc25a1d21ecd63a8/d076aa4/yewdux/src/service.rs:8:17
  |
8 | use yew_agent::{Agent, AgentLink, Bridge, Bridged, Context, Dispatched, Dispatcher, HandlerId};
  |                 ^^^^^  ^^^^^^^^^                   ^^^^^^^ no `Context` in the root
  |                 |      |
  |                 |      no `AgentLink` in the root
  |                 no `Agent` in the root

error[E0432]: unresolved import `yew_agent::AgentLink`
 --> /Users/pbsingh/DevTools/Rust/cargo/git/checkouts/yewdux-cc25a1d21ecd63a8/d076aa4/yewdux/src/store/link.rs:8:17
  |
8 | use yew_agent::{AgentLink, HandlerId};
  |                 ^^^^^^^^^ no `AgentLink` in the root

For more information about this error, try `rustc --explain E0432`.
intendednull commented 2 years ago

Yew agents now require agent messages to be serialized. This is not great, because Yewdux uses agents for state management. Basically Yewdux is being overhauled to use Contexts for state management instead. Currently a WIP, coming in the next week or so.

christopher-wilke commented 2 years ago

any workaround available?

intendednull commented 2 years ago

For now we can set Yew to a working commit. (0.19.1)

yew = { git = "https://github.com/yewstack/yew.git", rev="8a16d4fc3d9b96a3aab7c98b3ab61b55deac9d3c" }
intendednull commented 2 years ago

Official Yew 0.19 support is released. I suggest using that until I can get around to master support.

intendednull commented 2 years ago

Update: major rework on how Yewdux manages state is underway here. Got bare minimum working, with some features yet to be reimplemented.

intendednull commented 2 years ago

Changes have been merged to master! Now compatible with latest Yew.