github sycamore-rs/sycamore 0.5.0
✨ 0.5.0

latest releases: 0.9.1, 0.9.0, 0.9.0-beta.4...
4 years ago

Release post: https://sycamore-rs.netlify.app/news/announcing-v0.5.0

Changelog

  • ⚡️ Features

    • 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" }
      }
      template! {} // empty template
      [[@lukechu10], #89]
    • 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 from TemplateResult) to allow make the template system more flexible. It is now possible to imperatively construct Templates from raw dom nodes, Vecs, and closures [[@lukechu10], #104]
    • Sycamore router [[@lukechu10], #118]
    • Temporary "fake" hydration [[@lukechu10], #101]
    • Router use anchor tags (<a>) instead of Link components [[@lukechu10], #128]
    • Reactive scope dependency count utility function [[@lukechu10], #144]
  • 🛠 Fixes

    • 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 Templates with create_memo [[@lukechu10], #146]
  • 📃 Documentation

  • 🛠 Internal Fixes and Improvements

  • BREAKING CHANGES

    • Abstraction over rendering backend! This introduces the concept of GenericNode which is a trait to access the underlying rendering backend. Currently, Sycamore ships with DomNode and SsrNode out-of-the-box for rendering the the browser DOM and to a static string respectively. Components should now be generic over G: 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:
      #[component(MyComponent<G>)]
      fn my_component() -> Template<G> {
          todo!()
      }
      The #[component(_)] macro generates a struct under the hood that implements the Component 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 to ReactiveScope [[@lukechu10], #99]
    • Renamed crate from maple-core to sycamore and maple-core-macro to sycamore-macro. Also renamed all instances of "Maple" to "Sycamore" [[@lukechu10], #109]
    • Rename TemplateResult to Template [[@lukechu10], #112]
    • Rename reactive sub-module to rx [[@lukechu10], #113]
    • Remove render functions (render, render_to, render_to_string, etc...) from prelude. These functions are generally only called once in a Sycamore app so they do not belong in the prelude [[@lukechu10], #140]

Don't miss a new sycamore release

NewReleases is sending notifications on new releases.