react-datocms
A set of components and utilities to work faster with DatoCMS in React environments. Integrates seamlessy with DatoCMS's GraphQL Content Delivery API and Real-time Updates API.
Installation
npm install react-datocms
Documentation
This package offers different components and hooks. Please refer to one of the following pages to learn more about a specific area of interest:
<Image />
component for responsive/progressive images<StructuredText />
componentuseQuerySubscription()
hook for live, real-time updates of contentuseSiteSearch()
hook to render a DatoCMS Site Search form widgetrenderMetaTags()
and other helpers to render social share, SEO and Favicon meta tags
Demos
For fully working examples take a look at our examples directory.
Live demo: https://react-datocms-example.netlify.com/
Development
This repository contains a number of demos/examples. You can use them to locally test your changes to the package with npm link
:
npm link
cd examples/images-and-seo/vanilla-react
npm link react-datocms
npm run start
Now on another terminal you can run:
npm run watch
This will re-compile the package everytime you make a change, and the example project will pick those changes instantly.