Releases: yishn/wasm-react
v0.6.0
-
BREAKING: Removed
callback!
and introducedclones!
macroInstead of writing
let cb = callback!(clones(mut state, read_state), move |…| …);
you can write:
let cb = Callback::new({ clones!(mut state, read_state); move |…| … });
-
BREAKING:
ValueContainer
has been renamed toPropContainer
, andValueContainerRef
toPropContainerRef
accordingly -
BREAKING: Removed
ContextProvider::children()
method, useContextProvider::build()
instead -
BREAKING: Removed
Persistent
trait -
use_effect()
anduse_layout_effect()
can now handle closures which return()
as a noop destructor
v0.5.0
-
BREAKING: Removed
c!
andFragment
, instead children can be built using a tuple, e.g.h!(div).build(( h!(h1).build("Hello"), h!(h2).build("World!") ))
-
BREAKING: Removed
Callable
trait andPersistedCallback
, onlyCallback
andVoid
are left of the previouswasm_react::callback
module and moved towasm_react::Callback
andwasm_react::Void
. Callbacks can now be passed directly into props without persisting them withuse_callback()
first. -
BREAKING: Removed
VNodeList
, replaced byVNode
.VNode
is now an enum.VNode::empty()
has been renamed toVNode::new()
. -
Added
callback!
macro to createCallback
's which can clone-capture its environment.
wasm-react v0.3.2
- Breaking:
ContextProvider::build()
accepts children again Keyed
andMemoized
all implementComponent
trait now- New
KeyType
trait allows more types to be set as key - Better React effect names in dev tools
wasm-react v0.3.0
- Breaking: More consistent way to add React key to a component: Instead of
MyComponent.build_with_key(…)
, there's nowMyComponent.key(…).build()
. - Breaking: Rewrite context handling, also fix potential UB related to it
- Breaking: Change definition of
HType
trait - Breaking:
H<HtmlTag>::style()
now accepts a reference - Add
Component::memoized()
that returns a memoized version of the component
wasm-react v0.2.1
- Breaking: Imported components are now built with
H<[MyComponent]>
instead ofH<ImportedComponent>
therefore allowing custom convenience methods - Allow doc comments for exported components in
export_components!
HType
trait is not sealed anymore
wasm-react v0.2.0
- Breaking: Better ergonomics for including imported components by using
H
- Breaking:
H
has now a slightly different definition
wasm-react v0.1.1
Initial release.