Skip to content

0.9

Compare
Choose a tag to compare
@maciejhirsz maciejhirsz released this 26 May 09:24
· 18 commits to master since this release
3178c41
  • ⚠️ BREAKING: Hook::bind (used internally by the bind! macro) now returns a concrete type Bound<_, _> instead of an impl Listener<_>. While this is a breaking change, upgrading from 0.8 shouldn't require any changes for most projects.
  • Bound listeners are now Copy if the closure they're created from is also Copy.
    bind! {
        state:
    
        let reset = |_| *state = 0;
    }
    
    view! {
        // `reset` previously would be typed `impl Listener<_>`which made it `!Copy`
        <input onclick={reset} onchange={reset}>
    }
  • Added a new kobold::diff::VString type: a versioned string drop-in replacement for a regular String. This type provides all the regular methods of a String via Deref and DerefMut traits, but it tracks mutable access by incrementing an internal version counter. This makes diffing &VString much faster and cheaper than &String or even &str in places where the ref keyword cannot be used.
  • Added serde feature flag which implements Serialize and Deserialize traits from serde for VString.