Question: Why are you using Solid's createMutable?
See original GitHub issueI wasn’t sure if I should open an issue about this but I saw that you are using Solid’ createMutable
which is not recommended and is intended mostly for easier transition from libraries with similar APIs. Other than not having read and write segregation it also leads to over subscription. Maybe you guys are aware of that already, just wanted to make sure.
Issue Analytics
- State:
- Created a year ago
- Comments:11 (5 by maintainers)
Top Results From Across the Web
Mention gotchas regarding createMutable #149 - GitHub
I use it for internal state in my components because the dev experience is far better than having to write setter calls to...
Read more >State Management in SolidJS Applications - HackerNoon
State management for SolidJS applications with signals and stores. Do you need a state library like Redux or MobX for your SolidJS app?...
Read more >A few reasons why I love Solid.js - DEV Community
Solid is very modular: one can use its reactive primitives while skipping out on declarative templating (for example) to create a reactive state ......
Read more >If immutable objects are good, why do people keep creating ...
Most developers create mutable objects because mutability is the default in imperative ... There are some things you simply can't do with immutable...
Read more >how do I make granular signals that works for properties of a ...
One way you can do it is like this: import {createMutable} from 'solid-js/store' import {createEffect} from 'solid-js' class Foo { // any ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It is totally conceivable people can write all their state variables using
createSignal
(the fastest option), so outputting that would be totally fine. f.e.Maybe less ergonomic than stores in various cases, but still legitimate and still an idiomatic option
Should we not just use signals? What’s the downside to the most simple/idiomatic approach used in solidjs’s docs? Everything else here sounds more complex and deviates from the idea of “generate code just like a developer would write” for a given framework
We should be able to just reuse all of our react hooks logic, just make sure all reads add a
()
, so notlist
butlist()
in the code, which is a normal sort of thing we do for other output types