Fixes #23. Some tools such as next/head rely on a script tag existing
directly under the <Head> component. Allowing a react-schemaorg user
just pass the props opaquely to a <script> tag gives us both
encapsulation while getting the library to work.
Our public API surface area is now effectivley 3 pieces: the original
JSON-LD component, a function generating Helmet-style props, and this
function, which generates plain JSX-style props for <script>.
Fixes #23. Some tools such as
next/head
rely on a script tag existing directly under the<Head>
component. Allowing a react-schemaorg user just pass the props opaquely to a<script>
tag gives us both encapsulation while getting the library to work.Our public API surface area is now effectivley 3 pieces: the original JSON-LD component, a function generating Helmet-style props, and this function, which generates plain JSX-style props for
<script>
.