- 
                Notifications
    
You must be signed in to change notification settings  - Fork 4
 
Open
Description
Hey dude! Great tutorial, thanks!
Just wanted to let you know that in stage 5, you have this code:
impl HostipService {
    pub fn new() -> Self {
        Self {
            fetchserv: FetchService::new(),
        }
    }But there's no option to do this, I assume since yew got quite a lot of updates since your tutorial. Now instead of creating the service all you need to do is use FetchService and call the fetch function.
use yew::services::fetch::{FetchService, ....};
FetchService::fetch(request, handler.into()).unwrap()My env info:
❯ cargo version
cargo 1.45.1 (f242df6ed 2020-07-22)
❯ rustc --version
rustc 1.45.2 (d3fb005a3 2020-07-31)
and in Cargo.toml:
[lib]
crate-type = ["cdylib", "rlib"]
[dependencies]
yew = "0.17"Metadata
Metadata
Assignees
Labels
No labels