[WIP] Spread attributes and properties #1248
Merged
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.
So, I'm afraid I'm not able to get this feature to production because I'm severely lacking in the internals knowledge, but here's a PR you can play with.
It adds spread attributes/properties to both
Component
andElement
tags, with restrictions previously explored here: only one spread per tag and named attributes have precedence over them.There's no SSR at all and lots of code duplication. I'm still confused about the particularities of
contextualise
, the split betweenComponent
s andElement
s in the source and how to reuse code between them. I based this off attributes and, as far as I can tell, they too are not very reusable with the implementation split betweenAttribute
andComponent
.If anyone has tips on where to take this, I'll surely give it a try, but otherwise feel free to discard it with a proper implementation!