chirptune
Explore posts from serversHow to transform into getters outside of props?
When you pass a prop into a component it is transformed into a getter like
<MyProp color={color()}
, the props are { get color() { return color() } }
.
Is there a way to trigger such compile transformation for normal js code, like creating a normal object and transforming it into an object of getters?3 replies
Why is solid start dev site so heavy?
I ran
pnpm create solid
, picked the basic template, then ran dev
to encounter almost 10mb of js being loaded. I'm aware that building will minify, bundle and tree shake most of this, but building takes almost 6 seconds to build an empty app, even when building after a succesful build.
Something as equally confusing is that the heaviest resource is 1.5mb of shikiji, a syntax highlighter.
I found this issue, maybe related? https://github.com/solidjs/solid-start/issues/12814 replies
How to have reactive getters on each element?
Let's say I have a
createStore
, and I want each element to have a getter, how should I go about this?
I asked chat gpt, and he proposed this.
I think this looks ok enough, do you guys agree? Is there an alternative that lets you include getters right into the data I pass to createStore
?5 replies