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
there are just so many more considerations mutables bring and I didn't really design for them since i never use them for anything.
I probably should have just left them to 3rd party
I believe createMutable is an excellent API. I use it for internal state in my components because the dev experience is far better than having to write setter calls to modify stores made with createStore.
The majority of the time, we do not need read/write segregation for a component's internal state, so writing the following is simpler:
I haven't ran into any issues with mutables yet, and I've been using them exclusively for component state in an app at work. Knowing what issues exist, and documenting them, will go a long way.
The text was updated successfully, but these errors were encountered:
@ryansolid mentioned that there are some gotchas with mutables, and we should document them. They aren't mentioned.
From discord:
I believe
createMutable
is an excellent API. I use it for internal state in my components because the dev experience is far better than having to write setter calls to modify stores made withcreateStore
.The majority of the time, we do not need read/write segregation for a component's internal state, so writing the following is simpler:
I haven't ran into any issues with mutables yet, and I've been using them exclusively for component state in an app at work. Knowing what issues exist, and documenting them, will go a long way.
The text was updated successfully, but these errors were encountered: