5 ms·
You can definitely do this, though I think "data-am-" is better to avoid conflicts. React ignores unexpected attributes at the moment, but can't forever with Cu
by geelen 12y ago
You can definitely do this, though I think "data-am-" is better to avoid conflicts. React ignores unexpected attributes at the moment, but can't forever with Custom Elements (since it can't know what valid attributes for new elements are).
We've got an open discussion on this point, if you want to contribute there: https://github.com/amcss/attribute-module-specification/issues/4 https://github.com/amcss/attribute-module-specification/issu...
- wildpeaks 12y ago"data-am-" would be a good choice indeed :)
- germanforblack 12y agoAbsolutely! The prefix is optional (but recommended). If you're comfortable with data attributes (or, they're required for some reason), thats cool too.
- jlongster 12y agoI wouldn't completely assume react is going to give on that. In React you can create any custom properties you want to because it's just JS. The problem is how to interop with Web Components and from what I've seen nobody is really interested (rightfully so) in that