Skip to content

Commit

Permalink
Update examples (#1196)
Browse files Browse the repository at this point in the history
  • Loading branch information
stoically authored and mergify[bot] committed May 14, 2020
1 parent aa5faeb commit 8b231d5
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 11 deletions.
2 changes: 2 additions & 0 deletions examples/server/Cargo.toml
Expand Up @@ -6,3 +6,5 @@ edition = "2018"

[dependencies]
tungstenite = "0.10.1"

[workspace]
12 changes: 2 additions & 10 deletions yew-router/examples/minimal/src/lib.rs
Expand Up @@ -66,16 +66,8 @@ impl Component for Model {
Msg::RouteChanged(route) => self.route = route,
Msg::ChangeRoute(route) => {
// This might be derived in the future
let route_string = match route {
AppRoute::A(s) => format!("/a/{}", s),
AppRoute::B { anything, number } => format!("/b/{}/{}", anything, number),
AppRoute::C => "/c".to_string(),
};
self.route_service.set_route(&route_string, ());
self.route = Route {
route: route_string,
state: (),
};
self.route = route.into();
self.route_service.set_route(&self.route.route, ());
}
}
true
Expand Down
2 changes: 2 additions & 0 deletions yew-router/examples/servers/actix/Cargo.toml
Expand Up @@ -11,3 +11,5 @@ actix-web = "2.0.0"
actix-files = "0.2.1"
actix-rt = "1.1.0"
env_logger = "0.7.1"

[workspace]
2 changes: 2 additions & 0 deletions yew-router/examples/servers/warp/Cargo.toml
Expand Up @@ -9,3 +9,5 @@ edition = "2018"
[dependencies]
warp = "0.2.2"
tokio = {version = "0.2.19", features = ["macros"]}

[workspace]
2 changes: 1 addition & 1 deletion yew-router/examples/static/index.html
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8">
<title>Yew example</title>
<script type="module">
import init from "./wasm.js"
import init from "/wasm.js"
init()
</script>
</head>
Expand Down

0 comments on commit 8b231d5

Please sign in to comment.