react-amp-document

0.1.2 • Public • Published

"AMP Document" React Component

A lightweight React component that takes an AMP document URL as input and renders it.

User Guide

npm install react-amp-document

./index.html

<head>
  <!-- Include AMP runtime with Shadow DOM API. -->
  <script async src="https://cdn.ampproject.org/shadow-v0.js"></script>
</head>

./index.js

import AMPDocument from 'react-amp-document/amp-document';

// Create an <AMPDocument> and set its `src` prop to an AMP document URL:
ReactDOM.render(<AMPDocument src="https://ampbyexample.com" />);

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.1.2
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.1.2
    0
  • 0.1.1
    0

Package Sidebar

Install

npm i react-amp-document

Weekly Downloads

0

Version

0.1.2

License

Apache-2.0

Last publish

Collaborators

  • choumx