Answer the question
In order to leave comments, you need to log in
How do I write the content attribute in react?
this is my code
<div itemProp={"offers"} itemScope itemType={"http://schema.org/Offer"}>
<span itemProp="price" content="10.00">{10}</span>
</div>
Answer the question
In order to leave comments, you need to log in
Alternatively, you can use this hack:
sometimes it is convenient to define properties in a variable:
const spanProps = {
itemProp: 'price',
content: '10.00',
};
return (
<span {...spanProps}>10</span>
);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question