Fetch impl not functional, missing code?
Closed this issue · 1 comments
sumeet commented
I get the following error trying to run the Fetch example:
error[E0433]: failed to resolve: could not find `fetch` in `yewtil`
--> examples/fetch_demo/src/main.rs:3:13
|
3 | use yewtil::fetch::fetched::Fetched;
| ^^^^^ could not find `fetch` in `yewtil`
error[E0433]: failed to resolve: could not find `fetch` in `yewtil`
--> examples/fetch_demo/src/main.rs:4:13
|
4 | use yewtil::fetch::unloaded::Unloaded;
| ^^^^^ could not find `fetch` in `yewtil`
error[E0432]: unresolved import `yewtil::fetch`
--> examples/fetch_demo/src/main.rs:5:13
|
5 | use yewtil::fetch::{Fetch, FetchState};
| ^^^^^ could not find `fetch` in `yewtil`
error[E0433]: failed to resolve: use of undeclared type or module `Fetched`
--> examples/fetch_demo/src/main.rs:37:47
|
37 | <Fetched<String, Msg> render=Fetched::render(|s| html!{
| ^^^^^^^ use of undeclared type or module `Fetched`
error[E0412]: cannot find type `Fetched` in this scope
--> examples/fetch_demo/src/main.rs:37:18
|
37 | <Fetched<String, Msg> render=Fetched::render(|s| html!{
| ^^^^^^^ not found in this scope
error[E0412]: cannot find type `Unloaded` in this scope
--> examples/fetch_demo/src/main.rs:42:18
|
42 | <Unloaded<Msg>>
| ^^^^^^^^ not found in this scope
was there code missing from this commit? thanks for the work you've done on yew 🙂
hgzimmerman commented
Ah, this is my bad, I've removed and replaced an older version of a Fetch abstraction from the project, without removing the corresponding example. I should update the example to remedy this.
There is a newer Fetch related abstraction that I should replace this with. It should be noted that this newer Fetch code only works with projects built not using cargo-web
, and therefore may not be applicable to every project.