Skip to content

Change type alias to struct #595

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

Merged
merged 5 commits into from
Apr 3, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
//!
//! // `init` describes what should happen when your app started.
//! fn init(_: Url, _: &mut impl Orders<Msg>) -> Model {
//! Model::default()
//! Model { counter: 0 }
//! }
//!
//! // `Model` describes our app state.
//! type Model = i32;
//! struct Model { counter: i32 }
//!
//! // `Msg` describes the different events you can modify state with.
//! enum Msg {
Expand All @@ -23,7 +23,7 @@
//! // `update` describes how to handle each `Msg`.
//! fn update(msg: Msg, model: &mut Model, _: &mut impl Orders<Msg>) {
//! match msg {
//! Msg::Increment => *model += 1,
//! Msg::Increment => model.counter += 1,
//! }
//! }
//!
Expand All @@ -33,7 +33,7 @@
//! "This is a counter: ",
//! C!["counter"],
//! button![
//! model,
//! model.counter,
//! ev(Ev::Click, |_| Msg::Increment),
//! ],
//! ]
Expand Down