You don't need attributes once elements are instantiated. Just set properties.
-
-
Replying to @slightlylate
Do you not render WCs within each other? What I expect is React-style composition
1 reply 0 retweets 2 likes -
Replying to @pfrazee
React marketing has confused many. Web Components are JS objects with lifecycle APIs that also enable (de)serialization.
3 replies 0 retweets 5 likes -
Replying to @slightlylate
I think I understand but it's the attributes API that's confusing. I expected to use attrs -- and they're the thing that's string based.
2 replies 0 retweets 4 likes -
Replying to @pfrazee
You don't need to implement attribute support of you don't want to.
1 reply 0 retweets 1 like -
Replying to @slightlylate
Here's the problem. yo`<my-component thing=${value}></my-component>` is the pattern I expect. Yo-yo will do setAttribute('thing', value)
1 reply 0 retweets 2 likes -
Replying to @pfrazee @slightlylate
Which is a common-sense choice prior to WCs, but now I want to do what I do with react, eg: <my-component thing=${arrayOfValues}>
1 reply 0 retweets 1 like -
Replying to @pfrazee @slightlylate
So we'll need to modify yo-yo to do myComponentInst.thing = arrayOfValues instead... I guess under some heuristic for what should be a prop
4 replies 0 retweets 1 like -
Replying to @pfrazee @slightlylate
cc
@mikeal this is what I was talking about the other day2 replies 0 retweets 0 likes -
Key. React gave us ability to render Components as children, passing rich data in attrs. wc can't match w/o higher abstraction a la Skate
2 replies 0 retweets 4 likes
This is confused. You were always able to do this via DOM. React added a customer (non-HTML) parser on top of DOM.
-
-
Replying to @slightlylate @AdamRackis and
What I'm hearing is "I like JSX, HTML is a pain". Cool, but that's not about Web Components or ability to pass props.
1 reply 0 retweets 0 likes -
Wait, hold up. Are you saying, w/ raw wc, I can do <div> <my-widget fn="obj.fn"> where obj is an object somewhere, with a fn method on it?
4 replies 0 retweets 0 likes - 26 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
& Web Standards TL; Blink API OWNER
Named PWAs w/
DMs open. Tweets my own; press@google.com for official comms.