Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
It's been a while since I worked on this but I figured I should get this up again.
I've been reading into Solid a bit more and it seems like you generally want to pass values instead of signals/accessor functions in order to make fine-grained reactivity possible. This is why the Solid plugin complained in the case of
useControllableState
. Some reading material on this:solidjs/solid#749 (comment)
https://old.reddit.com/r/solidjs/comments/18dyxsb/why_not_pass_accessor_function_to_child_components
https://dev.to/this-is-learning/thinking-locally-with-signals-3b7h
solidjs/solid#2320 (comment)
I'm not sure if there's as much of a need for controlled components in Solid compared to in React, but if we do want to do it this way then it seems like Kobalte actually does this as well so I cheated and used their
createControllableSignal
as inspiration.The more I read about Solid's reactivity the more I want to go back to React tbh but oh well lol. I feel like the Solid docs don't do a very good job of explaining why or how stuff works but maybe that's just me lacking experience with it.