ampproject / amphtml

The AMP web component framework.
https://amp.dev
Apache License 2.0
14.89k stars 3.89k forks source link

AMP in React Js #11050

Closed jeenamanuel closed 7 years ago

jeenamanuel commented 7 years ago

How can i implement AMP in my react application.. Is it possible? when am trying a bundle.js file is creating and it shows an error that script tag is not allowed. So am not able to create a valid amp page

dreamofabear commented 7 years ago

You can embed AMP pages into your React app via AMP's special "shadow" runtime, shadow-v0.js. See a sample React component.

Also check out the entire sample React app and a live demo.

jeenamanuel commented 7 years ago

is it possible from client side? without using server side rendering

cramforce commented 7 years ago

Here is an article from Reddit how they implemented AMP with React https://redditblog.com/2016/09/20/amp-and-reactredux/

This will require server side rendering.

The AMP-PWA combo that @choumx pointed to does work with client side rendering for the non-AMP parts.