DEV Community

Discussion on: MoonZoon Dev News (3): Signals, React-like Hooks, Optimizations

Collapse
 
martinkavik profile image
Martin Kavík • Edited

A batch of important notes and ideas for next dev interation extracted from our chat with Pauan:

  • Mutable doesn't have to be wrapped in Rc since internally it's Arc. However MutableVec has to be wrapped. (And I agree with him it would be nice if Rust had two different Clone traits - one for reference cloning and one for deep value cloning.)
  • There is a chance const generics will be a better choice than unit types for defining rules in element builders.
  • Unlocking by a let binding and self-invoking closures demonstrated in one of the examples shouldn't work for non-Copy types.
  • We shouldn't rely too much on disabled default features because they could be enabled by other dependencies and there are some other potential problems.