You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a field should be modified, that's usually written as |value = RefCell::<i32>::new(initial)|; or similar.
(Technically using an atomic would be better in this case, but that's more verbose elsewhere.)
It should be possible to declare mutable instance fields more quickly, for example like so |mut value: i32 = {initial}|.
I haven't yet looked into the implications of adding a feature like this. Components with mutable fields would probably have to contain a RefCell instance, or alternatively I could confine mutable components to the current thread (which wouldn't be a big loss, since Asteracea targets primarily the single-threaded web platform in terms of rendering and event handlers shouldn't have to be Send or Sync either).
The text was updated successfully, but these errors were encountered:
If a field should be modified, that's usually written as
|value = RefCell::<i32>::new(initial)|;
or similar.(Technically using an atomic would be better in this case, but that's more verbose elsewhere.)
It should be possible to declare mutable instance fields more quickly, for example like so
|mut value: i32 = {initial}|
.I haven't yet looked into the implications of adding a feature like this. Components with mutable fields would probably have to contain a
RefCell
instance, or alternatively I could confine mutable components to the current thread (which wouldn't be a big loss, since Asteracea targets primarily the single-threaded web platform in terms of rendering and event handlers shouldn't have to beSend
orSync
either).The text was updated successfully, but these errors were encountered: