1.0.10 • Published 3 years ago

@davidcraig/react-schema v1.0.10

Weekly downloads
388
License
ISC
Repository
-
Last release
3 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

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.2

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago