1.0.10 • Published 4 years ago

@davidcraig/react-schema v1.0.10

Weekly downloads
388
License
ISC
Repository
-
Last release
4 years ago

React Schema.org

Set of helper classes to generate json-ld for a react application. Recommended to be used in SSR rendered websites or where treeshaking will remove unused code.

Example Usage

Simple object:

import { WebSite } from '@davidcraig/react-schema'
...

<WebSite
  name='My Website'
  description='Personal website for Me'
/>

With nested properties (using json) (not recommended):

import { WebSite } from '@davidcraig/react-schema
...

<WebSite
  name='Your Name'
  description='Personal website for Your Name'
  about={{
    type: 'Person', name: 'Your Name', url: 'https://dcraig.dev'
  }}
/>

With generated json from nested modules:

| Note: Each module exports their Json builder function.

import { WebSite } from '@davidcraig/react-schema
import { PersonJson } from '@davidcraig/react-schema/dist/Person/Person'
...

<WebSite
  name='Your Name'
  description='Personal website for Your Name'
  about={
    PersonJson({
      name: 'Your Name'
    })
  }
/>

Resources

1.0.10

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.2

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago