feat: Add support for prop: & attr: directives#4419
feat: Add support for prop: & attr: directives#4419rschristian wants to merge 7 commits intomainfrom
prop: & attr: directives#4419Conversation
📊 Tachometer Benchmark ResultsSummaryduration
usedJSHeapSize
Resultscreate10k
duration
usedJSHeapSize
filter-list
duration
usedJSHeapSize
hydrate1k
duration
usedJSHeapSize
many-updates
duration
usedJSHeapSize
replace1k
duration
usedJSHeapSize
run-warmup-0
run-warmup-1
run-warmup-2
run-warmup-3
run-warmup-4
run-final
text-update
duration
usedJSHeapSize
todo
duration
usedJSHeapSize
update10th1k
duration
usedJSHeapSize
|
|
Size Change: +255 B (+0.41%) Total Size: 62.2 kB
ℹ️ View Unchanged
|
Co-authored-by: Marvin Hagemeister <hello@marvinh.dev>
3f92ec5 to
798052a
Compare
798052a to
17fee02
Compare
|
I'll mark this as "ready", though I'm happy to still discuss whether we even want to do this and how it should interact with other things like RTS. IMO, it is a nice bit of power to give users though it is a bit of a deviation and might confuse some. Edit: What in the world is up with Coveralls |
Co-authored-by: Jovi De Croock <decroockjovi@gmail.com>
806e605 to
8b52a19
Compare
|
@rschristian I like this direction, but I would love to avoid using namespaces for the prefixes. I believe vue uses something like Interestingly, JSX does allow for two suffixes: <div prop$="foo" />;
<div attr-="bar" />;The other tidbit I wanted to add to this discussion is that we do technically already have a "force to use attribute" syntax, which is to uppercase the name ( |
I'm fully aware, but it's a hard thing to push users toward; as stable as it is, it's an obvious hack that most raise an eyebrow at when it's suggested. There's a few threads recently in particular w/ users uneasy after I've suggested using capitalization to get around it, hence, this PR. Also doesn't cover the "set this is as a property" case at all. It's a shame directives require some opt-in, I don't love how unclear |
|
Not at this time. |
|
What if there was a |
|
I don't think we want to get into every possibility; I'm not sure even explicit prop/attr directives will land as-is. If you want boolean, probably going to be on you to ensure they're added/removed when necessary via refs. |
First-pass impl of #4416