renaming getter function in createSignal #987
Ashutosh94g
started this conversation in
Ideas
Replies: 2 comments
-
Fully support that! That naming caused many misunderstanding in for new adopters. |
Beta Was this translation helpful? Give feedback.
0 replies
-
I think naming is entirely down to what makes you comfortable. I've just stored the result from |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
As we know that when we create a signal in Solidjs we get a getter and a setter function but the naming convention of the getter is value in the docs. for example
const [state, setState] = createSignal(false);
here due to some react vibe we name getter as a value which is accurate for react js but in our case, it should be more like
const [getState, setState] = createSignal(false);
This will directly indicate two things that are a getter function, not a value, and avoid a lot of confusion
Beta Was this translation helpful? Give feedback.
All reactions