[Oxpecker.Solid] Enhancement to allow spreading objects within elements - #51
Closed
shayanhabibi wants to merge 1 commit into
Closed
[Oxpecker.Solid] Enhancement to allow spreading objects within elements#51shayanhabibi wants to merge 1 commit into
shayanhabibi wants to merge 1 commit into
Conversation
shayanhabibi
marked this pull request as draft
February 8, 2025 07:03
Owner
[<SolidComponent>]
let Button (props: SomeObj) =
let local,others = Solid.splitProps(props, [| "class" |]) // user imported solid splitPropsI'm not sure it's feasible, the only way I see it can work - if argument and both results will be |
Contributor
Author
|
Indeed, not something I think can be put in Oxpecker atm. If I could perform introspection on host provided types in a type provider I would have been able to produce anonymous records on demand for type safety, but that doesn't seem to be possible. For the time being, I've implemented it in my own library and return a tuple of the same type that was provided to the function. Going to use it for translating solid js to oxpecker, but not exported for user use. |
Owner
|
Right, I see all those solidjs APIs around props as bunch of hacks, thus didn't want to implement any of those in the first place. |
Contributor
Author
|
Stale |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Add spread functionality pending fable-compiler/Fable#4038
Syntax:
output