Package Exports
- react-schemaorg
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-schemaorg) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
react-schemaorg
Easily insert valid Schema.org JSON-LD using the custom <JsonLd> react
component.
Uses schema-dts for Schema.org TypeScript definitions.
Note: This is not an officially supported Google product.
Usage
Install react-schemaorg and
your desired version of
schema-dts:
npm install schema-dts
npm install react-schemaorgThen, to insert a simple JSON-LD snippet:
import { Person } from "schema-dts";
import { JsonLd } from "react-schemaorg";
export function GraceHopper() {
return <JsonLd<Person>
item={{
"@context": "https://schema.org",
"@type": "Person",
name: "Grace Hopper",
alternateName: "Grace Brewster Murray Hopper",
alumniOf: {
"@type": "CollegeOrUniversity",
name: ["Yale University", "Vassar College"]
},
knowsAbout: ["Compilers", "Computer Science"]
}}/>;
}Developers
Use NPM to install dependencies:
npm installUse tsc to build:
tscTo contribute changes, see the CONTRIBUTING.md file.