React and AMP to create content drive application

(Parvez Shaikh) #1

Hi All,

I have been working on AMP project for the last half a year and thought why not to use React for my content driven web app. After searching AMP + React, haven’t found much on what I can use it as a boilerplate. Created my own boilerplate too, but on HTML page, the script tag is what is stopping me.

Is there anyone who had faced the same problem and came out with any solution to it.

(Sophie Alpert) #2

If I’m not mistaken, AMP doesn’t allow you to run any JS that isn’t provided by Google, including React.

(Parvez Shaikh) #3

Yes, it doesn’t allow you to include scripts other than Google/AMP scripts libraries.

The idea to include react came from the following blog:

Few more references:

All the above references are not fully legitimate.

(Sophie Alpert) #4

It looks like some of those use React’s server-side rendering to build a page, and one of them is a React component that displays AMP documents. Not one that works on AMP pages itself.

(Parvez Shaikh) #5

I tried react-amphtml, it allow me to use amp component in react UI but how that is getting validated as it still include script tag in the final output.