The AMP layout system ported to React.js as a couple of easy to use functional stateless components.
npm install --save react-amp-layout
Either require the default exported component Layout
:
import Layout from 'react-amp-layout';
or import the specific layout component you're interested in:
import {FixedHeight} from 'react-amp-layout';
You can check out a live example and play around with the React.js or browser devtools
here.
It takes a few seconds to load (transpilation is done in the browser) but after that it should
run fine.
The idea for this component is heavily inspired by the work of the awesome people working on the AMP Project who have figured out the layout system and documented it.