In React 16, unknown element props are now set as attributes: https://facebook.github.io/react/blog/2017/09/08/dom-attributes-in-react-16.html … But how do you set a property on an element?
-
Show this thread
-
Replying to @tomdale
I'm not the authority, but React is heavily attribute based. Things like `value` assign as a prop, but otherwise you'd use DOM manipulation
1 reply 0 retweets 0 likes -
Replying to @natehunzaker @tomdale
It gets tricker with custom/unknown attributes. We could potentially use the property if it exists and fallback to setAttribute
1 reply 0 retweets 0 likes -
Yes! I was just looking at https://custom-elements-everywhere.com . HyperHTML's approach of checking the prototype to determine assignment is interesting.
1 reply 0 retweets 0 likes -
Sebastian Markbåge Retweeted Sebastian Markbåge
I'm pretty concerned about this strategy from a future compatibility perspective.https://twitter.com/sebmarkbage/status/894684437211828224 …
Sebastian Markbåge added,
2 replies 0 retweets 2 likes -
Seems WC authors will need to be aware of naming collisions. If frameworks adopt similar heuristics at least we get consistency.
2 replies 0 retweets 1 like
Ember is planning on migrating away from anything that looks like a runtime test to determine attr vs prop.
-
-
I would love to follow that work. Working in this space quickly made me realize how much I have to learn.
0 replies 0 retweets 1 likeThanks. Twitter will use this to make your timeline better. UndoUndo
-
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.