New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

jsx-schema

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jsx-schema

Add Schema to your React app

latest
npmnpm
Version
1.0.3
Version published
Maintainers
1
Created
Source

Add Schema to your React application

Help Search Engines with structured data on your pages made with React. Read more about schema here https://schema.org/

How to use it

import JSXSchema from "jsx-schema";

export default function App() {
  return (
    <div className="App">
      <h1>Title of Product</h1>
      <JSXSchema
        type="Product"
        name="Name of product"
	sku="12345678"
	description="Lorem ipsum..."
	offers={{
	  type: "Offer",
	  price: 10,
	  priceCurrency: "USD",
	  availability: "In stock"
	}}
	aggregateRating={{
	  type: "AggregateRating",
	  ratingValue: "4.8",
	  reviewCount: "11"
	}}
      />
    </div>
  );
}

Context is using https://schema.org/ by default

If you wanna change it, simply add context as a prop. Validate schema here: https://validator.schema.org/

Keywords

react

FAQs

Package last updated on 19 Sep 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts