Release post: https://sycamore-rs.netlify.app/news/announcing-v0.8.0
-
- Add
.map()
utility toSignal
. - Reactive Primitives v2 🎉! Read the blog post for more information.
- Suspense and async components.
- Async transitions.
- Type-checked HTML element tags.
- Builder API v2!
- SVG support.
- Implement
AddAssign
and friends forSignal
. - Add
Signal::modify
to mutate signal. - Add
NoHydrate
andNoSsr
utility components. - Add
from_web_sys
function. - Add
prop:
directive toview!
- Add
dangerously_set_inner_html
to the builder API. - Print hydration key for hydration mismatch.
- New view syntax for components. Unifies the syntax used for setting attributes/props in elements and components.
- Add
-
- Make
SsrNode
attribute order stable. - Call cleanup callbacks in
map_keyed
andmap_indexed
- Create a nested reactive scope if
cx
is used inside dyn expression. - Fix and simplify
SsrNode
andHydrateNode
codegen inview!
. - Fix hydration for top-level dynamic views.
- Fix setting
class
on SVG elements. - Fix parsing of legacy components in child views.
- Fix destructuring in async component props.
- Add the
<body>
tag to the HTML elements list. - Fix
scope_depth
to return0
for root scope. - Fix removing old nodes from parent.
- Remove Unit
()
implementation ofProp
. - Add
Debug
implementations to all public items. - Fix boolean attribute list.
- Allow fragments and dynamic views in
Router
. - Fix hydration error for
Router
.
- Make
-
- Update license to 2022.
- Make website responsive and mobile-friendly.
- Use in-tree
js-framework-benchmark
implementation for benchmarking. - Split the
sycamore
crate intosycamore-core
andsycamore-web
. - Simplify
reconcile_fragments
implementation. - Update MSRV to 1.63 and remove some
unsafe
s fromsycamore-reactive
.
Release post: https://sycamore-rs.netlify.app/news/announcing-v0.7.0
-
- Implement
TryFromSegments
forT: Route
. This allows the creation of nested routers. See the docs for more information about usage. - Make parenthesis optional in
cloned!
macro. The following syntax is now accepted, in addition to the old syntax:// Before cloned!((my, variables, to, clone) => move || { ... }) // After cloned!(my, variables, to, clone => move || { ... })
- Builder API. Check out the
hello-builder
example for more usage details. - Make
wasm-bindgen-interning
a feature. This feature is enabled by default but can be opted-out which would disablewasm-bindgen/enable-interning
. Opting-out can lead to a slight decrease in binary size at the cost of performance. - Introduce
render_get_scope
function. This allows accessing (and disposing of) theReactiveScope
created by the render function. - Hydration support. To enable hydration,
replace calls to
render
andrender_to
withhydrate
andhydrate_to
. - Add
#[track_caller]
touse_context
. This makes it much easier to debug the"context not found for type"
error. - Better debugging utilities for inspecting the
ReactiveScope
hierarchy.
- Implement
-
- Prevent data binding from panicking when not in browser.
- Extend
ReactiveScope
into scopes that are siblings. - Fix
Lerp
implementation for integers. - Fix context API not working through
Indexed
andKeyed
. - Update TodoMVC example to use context API.
- Remove
autocomplete
from the list of boolean attributes for codegen. - Fix parenthesizing of expressions in
view!
macro interpolation syntax. - Fix context API when effects are re-executed.
- Allow constant generics to be used with
#[component]
macro.
-
- Refactor
GenericNode
and introduceHtml
trait. AddIS_BROWSER
constant toHtml
.. For projects that target HTML, it is recommended to use theHtml
trait instead ofGenericNode
. This will ensure that it cannot be used on rendering backends that are not for HTML. To check if code is executing on the browser, access theHtml::IS_BROWSER
constant on the generic rendering backend. This also slightly changes theGenericNode
interface which is why it is a breaking change but would most likely not influence you. - Make
GenericNode
generic over the event type. The event type is now an associated type to allow rendering backends to use another type fromweb_sys::Event
. - Rename
Template
toView
andtemplate!
toview!
. For most cases, a simple search-and-replace will suffice, replacing all instances ofTemplate
toView
and all instances oftemplate!
toview!
. - Rename
StateHandle
toReadSignal
. The old name was somewhat confusing and did not reflect thatStateHandle
was just a read-only signal.
- Refactor
-
- Do not strip leading
/
from pathname. This fixes an issue with the router on Firefox when navigating to the index page.
- Do not strip leading
-
- Disable
full
feature onsyn
to reduce compile times. - Use a global
HashSet
for void elements lookup in SSR. - Remove part of formatting machinery from
sycamore
andsycamore-reactive
to reduce binary size. - Fix panic on updating dynamic node inside a template fragment.
- Implement
Default
forSignal
. - Implement
Default
forStateHandle
.
- Disable
Release post: https://sycamore-rs.netlify.app/news/announcing-v0.6.0
-
- Add integrations for
sycamore-router
. - Added
dangerously_set_inner_html
special attribute to html elements. This allows directly setting an element's inner html without going through aNodeRef
and manually calling.set_inner_html()
. - Implement
Portal
s. Portals allow adding nodes to elements that are in another tree. - Allow instantiating components with the
Component
trait. You can now also create components that are generic over another component. This pattern can be seen in thehigher-order-components
example. - Respect base html tag in router.
- Dark mode on website!
create_reducer
hook. Thecreate_reducer
hook is an alternative toSignal::new
. It allows you to use a reducer function to get the next state from the previous state.enum Msg { Increment, Decrement, } let (state, dispatch) = create_reducer(0, |state, msg: Msg| match msg { Msg::Increment => *state + 1, Msg::Decrement => *state - 1, });
- Opt out of router by using
rel="external"
on an anchor tag. Addingrel="external"
to an anchor tag will use the browser's default navigation behavior.template! { a(href="path", rel="external") { "Link" } }
- Add integrations for
-
- Fix logic error in
reconcile_fragments
. - Fix grammar on website index page.
- Scroll to top when navigating to a page.
- Use
ahash
instead of default SipHash for better performance. - Explicitly define MSRV to 1.53 and run CI in a matrix.
- Remove inline JS snippet. This removes the need to load an extra JS file before Sycamore can start.
- Add some UI tests for
#[component]
attribute macro. - Generate a
sitemap.xml
for the website. - Fix broken link to the reactivity page on the website index page.
- Explain that Trunk needs a
index.html
file in Hello World docs. - Remove internal
Rc
fromDomNode
. This significantly improves performance and memory usage. See the PR for benchmarks. - Optimize the website with
wasm-opt
to reduce binary size. - Optimize
create_effect
. - Fix
SsrNode
's implementation ofremove_child
removing two children instead of just one. - Hold a backlink for each
ReactiveScope
to its parent scope. This fixes a bug whereuse_context
could only access the context on the first render and would panic on subsequent accesses. - Remove dependency on
chrono
. This was replaced with direct access to browser APIs to reduce the number of dependencies and thus to improve build times. - Replace internal usage of
.unwrap()
with.unwrap_throw()
. Slightly improves binary sizes. - Derive
Clone
forsycamore_router
path types. - Update
todomvc
example with latest features. - Fix router not actually parsing identifiers. Fixes a bug where a dynamic parameter followed by a dynamic segment would parse as a single segment.
- Build rustdocs in CI. The API documentation
for the
master
branch is available at sycamore-rs.netlify.app/api. - Reorganize documentation a bit.
- Fix logic error in
-
- Extract reactive primitives into separate crate
sycamore-reactive
. Reactive primitives are now re-exported in thesycamore
crate to avoid adding new dependencies to your project. It is also now possible to use reactive primitives without usingsycamore
by directly depending onsycamore-reactive
. - Rename sub-module
sycamore::rx
tosycamore::reactive
.rx
might be ambiguous with Rx family of libraries. Renaming toreactive
makes it clear that it works differently from Rx libraries. - Refactored router with new API. See the new documentation for more details.
- Support boolean attributes. Some attributes
now expect a
bool
instead ofimpl ToString
. This also fixes an issue where previously, attributes couldn't be removed directly from thetemplate!
macro.// Before template! { input(type="checkbox", checked="") { "Checkbox" } } // After template! { input(type="checkbox", checked=true) { "Checkbox" } }
- Extract reactive primitives into separate crate
-
- Context API: introducing
ContextProvider
anduse_context
[@lukechu10, #169]
- Context API: introducing
-
- Router should not prevent default if meta keys are held down [@baile320, #165]
- Remove some
optional
tags on dependencies [@lukechu10, #167] - Explicitly enable
std
feature inindexmap
to prevent compile error [@Gearme, #170] - Do not panic when
map_keyed
is updated with same data in debug mode [@lukechu10, #173]
-
- Add some integration tests for
StaticRouter
[@lukechu10, #168] - Fix intra-doc link [@tshepang, #162]
- Refactor
sycamore-macro
static text and splices [@lukechu10, #175]
- Add some integration tests for
-
- Simplify cargo command in documentation [@tshepang, #163]
- Fix link to book in website version selector [@lukechu10, #166]
-
- Performance tweaks [@lukechu10, #171]
-
- Remove
Hash
trait bound fromT
inKeyed
[@lukechu10, #148]
- Remove
-
- Add news section to website with v0.5.0 release post [@lukechu10, #149, #149]
- Fix typo in v0.5.0 release post [@tshepang, #156]
- Add versioned docs to website [@lukechu10, #160]
-
- Reduce allocations when creating
Template
s [@lukechu10, #143] - Do not create effects when splice is static (using simple heuristic) [@lukechu10, #155]
- Set
className
directly instead of callingsetAttribute
[@lukechu10, #157] - Optimize
create_effect
[@lukechu10, #159]
- Reduce allocations when creating
Release post: https://sycamore-rs.netlify.app/news/announcing-v0.5.0
-
- Tweened signals [@lukechu10, #86]
- Add more easing functions [@tmpr, #90]
- Document fragments in the
template!
macro.template!
can now accept the following input:template! { p { "First" } p { "Second" } }
[@lukechu10, #89]template! {} // empty template
- 2-way data binding for certain supported props [@lukechu10, #93]
- Allow generic component's type parameters to be inferred from context [@lukechu10, #100]
- Refactored
Template
(renamed fromTemplateResult
) to allow make the template system more flexible. It is now possible to imperatively constructTemplate
s from raw dom nodes,Vec
s, and closures [@lukechu10, #104] - Sycamore router [@lukechu10, #118]
- Temporary "fake" hydration [@lukechu10, #101]
- Router use anchor tags (
<a>
) instead ofLink
components [@lukechu10, #128] - Reactive scope dependency count utility function [@lukechu10, #144]
-
- Implement missing operations on
SsrNode
[@lukechu10, #82, #138] - Remove warning when effects are created outside of a reactive scope [@JuanMarchetto, #95]
- Do not assume
Signal
is valid for entire duration of the effect and make effect triggers deterministic (outer effects rerun first) [@lukechu10, #145] - Eagerly evaluate dynamic
Template
s withcreate_memo
[@lukechu10, #146]
- Implement missing operations on
-
- Host documentation on website [@lukechu10, #83]
- Write documentation [@lukechu10, #87, #111, #133]
- Fix
CHANGELOG.md
typo [@Riey, #102] - Style documentation website with TailwindCSS [@lukechu10, #117]
- Use router for documentation website header [@lukechu10, #132]
- Extract outline from markdown and new index page [@lukechu10, #134]
- Move documentation under
/docs/*
path [@lukechu10, #139]
-
- Build website in GitHub Actions [@lukechu10, #84]
- Run unit tests in Miri to catch memory errors [@lukechu10, #91]
- Update Trunk to v0.11.0 [@lukechu10, #96]
- Improve documentation website lighthouse score [@lukechu10, #97]
- Setup gitpod.io configuration to make it easier to contribute [@lukechu10, #98]
- Update
wasm-bindgen
to v0.2.74 in.gitpod.Dockerfile
[@lukechu10, #108] - Update links to git repository to point to
sycamore-rs/sycamore
[@lukechu10, #110] - Add micro-benchmarks for
map_indexed
andmap_keyed
[@lukechu10, #115] - Run js-framework-benchmark in GitHub
Actions. Pull requests with the
performance
tag will automatically trigger a benchmark run [@lukechu10, #114] - Fix branch naming to work with continuous benchmark [@lukechu10, #116]
- Various performance improvements [@lukechu10, #126]
- Google search console verification file [@lukechu10, #135]
- Get
NodeId
forDomNode
lazily to improve performance whenHash
is not used [@lukechu10, #136] - Do not insert unnecessary marker nodes [@lukechu10, #137]
- Remove unnecessary
Rc<RefCell<_>>
s [@lukechu10, #141] - Cache
window.document
since it is frequently used to prevent going through JS interop [@lukechu10, #142]
-
- Abstraction over rendering backend! This introduces the concept of
GenericNode
which is a trait to access the underlying rendering backend. Currently, Sycamore ships withDomNode
andSsrNode
out-of-the-box for rendering the the browser DOM and to a static string respectively. Components should now be generic overG: GenericNode
to be able to render to multiple backends [@lights0123, #67] - Require using the
#[component(_)]
attribute macro for defining components. This changes the component syntax to:The#[component(MyComponent<G>)] fn my_component() -> Template<G> { todo!() }
#[component(_)]
macro generates astruct
under the hood that implements theComponent
trait for improved type safety. This also means that you no longer need#[allow(non_snake_case)]
in your code! [@lukechu10, #70] #92] - Rename
Owner
toReactiveScope
[@lukechu10, #99] - Renamed crate from
maple-core
tosycamore
andmaple-core-macro
tosycamore-macro
. Also renamed all instances of "Maple" to "Sycamore" [@lukechu10, #109] - Rename
TemplateResult
toTemplate
[@lukechu10, #112] - Rename
reactive
sub-module torx
[@lukechu10, #113] - Remove render functions (
render
,render_to
,render_to_string
, etc...) fromprelude
. These functions are generally only called once in a Sycamore app so they do not belong in the prelude [@lukechu10, #140]
- Abstraction over rendering backend! This introduces the concept of
-
- Support
'-'
in attribute names. This makes the following syntax valid:[@lukechu10, #79]template! { button(aria-hidden="true") }
- Support
-
- Delete removed nodes in
Keyed
first before adding new nodes and moving existing nodes [@lukechu10, #77]
- Delete removed nodes in
-
- Fix
Keyed
iteration (hopefully for the last time) when moving nodes already inserted [@lukechu10, #75]
- Fix
-
- Fix
Keyed
iteration (swapping and inserting not at the end) [@lukechu10, #73]
- Fix
-
- Fix typo in
README.md
[@iwburns, #64]] - Add discord server link to issue template [@lukechu10, #68]
- Fix typo in
-
- Fix filter links in TodoMVC example [@lukechu10, #65]
-
- Iteration using
SignalVec
. This is more of an experiment and there are some bugs. This will most likely be removed in a future version [@lukechu10, #49] - Keyed iteration using
Keyed
and non-keyed iteration usingIndexed
which can iterate over aSignal<Vec>
. This is the recommended way to iterate over a list of values [@lukechu10, #51, #53 and #54] - Node references. Use the
ref
attribute to bind an HTML element to aNodeRef
[@lukechu10, #57]
- Iteration using
-
- Fix debug assertions in
Keyed
[@lukechu10, #53]
- Fix debug assertions in
-
- Setup integration tests [@lukechu10, #51]
-
- Complete spec conforming TodoMVC implementation [@lukechu10, #60]
-
- More types in
template!
macro.template!
can now be nested [@lukechu10, #45] - Component lifecycle using
on_cleanup
[@lukechu10, #24]
- More types in
-
- Add some badges to
README.md
[@lukechu10, #44 and #48]
- Add some badges to
-
- Nested effects. Inner effects are destroyed and recreated when outer effects re-run [@lukechu10, #29]
cloned!
macro for making it easier to clone items into a new scope [@lukechu10, #34]- Effects are created inside a reactivity root (using
create_root
). When the rootOwner
is dropped, all effects are also destroyed [@lukechu10, 37] - Nested templates. Using this, it is also possible to build simple
if
/else
control flow although there will be a more polished version [@lukechu10, #41]
-
- Parse html root as an
HtmlTree
[@lukechu10, #25] - Recreate effect dependencies on each re-run [@lukechu10, #29]
- Parse html root as an
-
- Remove double boxing of
Computation
[@Kestrer, #31] - Create
CODE_OF_CONDUCT.md
[@lukechu10, #33] - Add some preliminary benchmarks for signals and effects [@lukechu10, #35]
- Add clippy to CI workflow [@Kestrer, #42]
- Remove double boxing of
-
- New documentation website: https://sycamore-rs.netlify.app/ [@lukechu10, #26 and #40]
-
- The
template!
macro now returns aTemplateResult
instead of raw DOM nodes for increased type safety [#10]
- The
-
- New
untracked
utility for explicitly opting out of automatic dependency detection in reactive contexts [#8]
- New
-
- Only subscribe to a dependency once in an effect, even if it is called multiple times [#7]
-
- Initial release!
- Added
template!
macro. - Added reactivity primitives.