A Rust framework for creating web apps
fetch
module (use gloo-net
)websocket
module (use gloo-net
or wasm-sockets
)web-storage
module (use gloo-storage
)log!
and error!
macros (use gloo-console
)md!
macro (use an external crate + El::from_html
)cookies()
function (use an external crate like cookie)panic-hook
feature (use console_error_panic_hook
)serde-json
and serde-wasm-bindgen
featuresrouting
featureRc<Vec<String>>
to Rc<[String]>
.
It means also Orders::clone_base_path
returns a slice.markdown
featureOption<&Namespace>
to functions Node::from_html
and El::from_html
.impl<Ms, T: IntoNodes<Ms>> IntoNode<Ms> for Option<T>
.
This might conflict with local impl
s of IntoNodes
, but should make those unnecessary and safe to remove.browser::service::fetch
module.fetch::Error::SerdeError
changed to fetch::Error::JsonError
download
attribute.wheel_ev
and to_wheel_event
.Response::blob
panic-hook
feature, enabled by default, to conditionally include console_error_panic_hook
raw_svg!
(#589).browser::dom::Namespace
to prelude
.At::Role
variant.Response::headers
.Headers::new
.Header::name()
and Header::value()
.fetch::form_data::FormData
and Request.form_data
.serde-wasm-bindgen
and serde-json
features to use either serde-wasm-bindgen
or serde_json
for JSON de-/serialization.
serde-wasm-bindgen
reduces final binary size for downstream users.serde-json
is enabled by default.FetchError
.Request.body_ref
to take the body by reference.sl_input
to the custom_elements
example.drag_and_drop
, record_screen
, e2e_encryption
and counters
.charts
example.page_trait
example.on_insert
event on elements, triggered when they are inserted into the DOM.AsAtValue
for Option<T>
From<impl AsRef<web_sys::Headers>>
for Headers
.FromIterator<(impl Into<Cow<'a, str>>, impl Into<Cow<'a, str>>)>
for Headers
.wheel_ev
in canvas
example to zoom rectangle with mouse scroll wheel.Eq
and PartialEq
for Header
.div!
can now contain Iterator
s inside of Option
values. Previously only one or the other was possible.linear_gradient!
to linearGradient!
for consistency with the other svg macros (same with radial_gradient!
and mesh_gradient!
) (#377).base_path
with a trailing slash parsing / handling.C
macro memory / WASM file size issue.tests
, service_worker
, resize_observer
, component_builder
, i18n
and unsaved_changes
(#459).UrlRequested
handling (#459).effects
to effect
.App::update_with_option
.Navigator
and BeforeUnloadEvent
into Seed's web_sys
.with_dollar_sign!
.RequestAnimationFrameTime
+ RequestAnimationFrameHandle
+ request_animation_frame
are deprecated.set_interval
+ set_timeout
are deprecated.class!
is deprecated in favor of C!
.AppBuilder
with sink
, mount_point
, routes
, window_events
, etc. (Use App::start
instead.)GMsg
, GMs
, ..). Use orders.notify
+ orders.subscribe
instead.view
and update
type in App::start
from fn
to FnOnce + Clone
.Ev::TriggerUpdate
.simple_ev
is deprecated.console_error_panic_hook
.UrlChanged
firing by removing hashchange
listener.Request::bytes
.Orders
methods request_url
(#518) and msg_sender
(#502).Orders::msg_mapper
returns Rc<..>
instead of Box<..>
.pub use wasm_bindgen_futures::{self, spawn_local, JsFuture};
and pub use futures::{self, future::{self, FutureExt, TryFutureExt}};
in lib.rs
.websocket
.Display
for Node
(#294).push_route
and the method Url::hash_path
.Url
methods skip_hash_base_path
and encode_uri_component
(#424).Node::NoChange
.el_key
to force reinitialize an element.el_key
method for adding keys to El
s (#354).'static
bound from El
and Node
.perform_cmd
and seed::browser::service::fetch
return type to T
instead of Result<T, T>
.UpdateEl<T>
changed to UpdateEl<Ms>
and fn update(self, el: &mut T);
to fn update_el(self, el: &mut El<Ms>);
(#370).UpdateElForIterator<Ms>
.Iterator
s, Option
, u32
, i32
, usize
, f64
and references in element creation macros (#365, #128).String
implements UpdateEl<T>
. (References are now required for String
properties, e.g. div![&model.title]
.)href
detection to ignore use
elements (#384).subscribe
, subscribe_with_handle
, perform_cmd_with_handle
, stream
, stream_with_handle
and notify
into Orders
(#130).cmds::timeout
, stream::interval
, stream::window_event
, stream::document_event
, subs::UrlChanged
and subs::UrlRequested
(#131).perform_cmd
and perform_g_cmd
are executed immediately.App
methods notify
and notify_with_notification
.App
method process_cmd_and_msg_queue
renamed to process_effect_queue
.routes
is not defined).cmds
, streams
, subs
, CmdHandle
, SubHandle
and StreamHandle
into the Seed's prelude.next_tick
.App::start
(alternative to AppBuilder
) (#376, #382).GetElement
+ included in the prelude
(alternative to MountPoint
, used in AppStart
).Debug
for ElRef
.C!
and IF!
and helper not
(#375).ToClasses
+ included in the prelude
.ev
accepts handlers that return Msg
, Option<Msg>
or ()
(#394).EventHandler::new
accepts only handlers that return Option<Msg>
.ev
-like functions and some Orders
method require 'static
bound for generic types (temporary).Orders::after_next_render
now accepts callbacks that return Msg
, Option<Msg>
or ()
.View
is deprecated in favor of IntoNodes
.View
isn't implemented for El
and Vec<El>
.Node::add_listener
renamed to add_event_handler
.README.md
.seed::browser::fetch
(#353)seed::browser::service::fetch
module is deprecated in favor of seed::browser::fetch
.IntoNodes
for Option<Node<Msg>>
and Option<Vec<Node<Msg>>>
.UpdateEl
for i64
and u64
.checked
and value
on attribute remove (#405).markdown
, tea_component
, subscribe
, custom_elements
, fetch
, url
, pages
, pages_hash_routing
, pages_keep_state
, auth
, bunnies
and graphql
(#400).app_builder
, orders
, server_interaction
, counter_advanced
and mathjax
.animation_frame
renamed to animation
.Orders::clone_base+path
(#369).Url
and routing.rs
.seed::browser::service::storage
.LocalStorage
, SessionStorage
and WebStorage
(trait).TouchEvent
and touch_ev
definitions.DragEvent
and drag_ev
definitions.to_kbevent
to to_keyboard_event
.after_next_render
returns RenderInfo
.web_sys
, js_sys
and wasm_bindgen
+ wasm_bindgen::JsCast
included in prelude
.WebSocket
+ related items (#8).App::mailbox
.streams::backoff
+ updated websocket
example.UpdateEl
for Filter
and FilterMap
.El::is_custom(&self)
.update
and trigger_update_ev
.value
and checked
setting for input elements (a bug in VirtualDOM patch algorithm).EventHandler
instead of Listener
. (Listener
is now used as the internal DOM EventListener representation.)raw_ev
is deprecated in favor of ev
. Functionality is the same.ElRef
and examples (canvas
, user_media
or todomvc
) (#115).Ms: Clone
restriction as much as possible.Custom
variant from Custom(String)
to Custom(Cow<'static, str>)
in Ev
, Tag
, At
and St
. Use function from
to create custom entities (e.g. At::from("my-attribute")
) (#208).nodes!
. It accepts Node<Msg>
and Vec<Node<Msg
, returns flattened Vec<Node<Msg>
.todomvc
.counter
example to counter_advanced
.drop
example to drop_zone
.server_interaction_detailed
example.counter
example.README.md
.#![forbid(unsafe_code)]
so the Seed will be marked as a safe library by the Rust community tools.clone
restriction from the method Effect::map_msg
.UpdateEl
for FlatMap
.MessageMapper::map_message
changed to MessageMapper::map_msg
.fetch
and storage
moved to seed::browser::service::{fetch, storage}
,
but reimported at the lib level. Ie: seed::fetch
, and seed::storage
.Vec<Attr>
and Vec<Style>
in view macros.App
included in prelude
.async/.await
. fetch.rs
docs updated.Attrs
, Style
, Listener
. ie, can import with seed::Style
etc.seed::canvas()
, and seed::canvas_context()
helper functions.Url
parsing (resolves issue with hash routing).From<String> for Url
changed to TryFrom<String> for Url
.orders.after_next_render(Option<RenderTimestampDelta>)
(#207).Init
struct, replacing it with BeforeMount
and AfterMount
structs to
better denote state before and after mounting the App
occurs.builder
which replaces build
as part of deprecating Init
.build_and_start
which replaces finish
as part of deprecating Init
.IntoInit
and IntoAfterMount
traits. It is possible to use these
in place of a closure or function to produce the corresponding Init
and AfterMount
structs.IntoAfterMount
will now be run after the routing message.app_builder
.events::Listener
is included in prelude
.()
s have been replaced with structs - e.g. GMs = ()
=> GMs = UndefinedGMs
.WindowEvents
alias changed to WindowEventsFn
for consistency with other *Fn
.At
variantsSt
enum, for style keys; similar to At
add_child
, add_attr
, add_class
,
add_style
, replace_text
, and add_text
, Node
methods