Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
この回答isでは、文書化されていない機能を使用してカスタム属性を React 要素に追加する方法について説明しています。ただし、括弧で囲まれたamp-bindで使用する属性を追加したいと思います。これを試してみると、属性は追加されません:
is
const ampProps = { '[class]': 'foo.bar', }; return <div is {...ampProps}><MyComponent></div>
カスタム属性を追加するにはどうすればよいですか?