react-faq-component icon indicating copy to clipboard operation
react-faq-component copied to clipboard

Use react-faq-component from CDN

Open armenic opened this issue 3 years ago • 0 comments

Dear Developers, I need to use react-faq-component directly from CDN and the reason is because I need to embed an app within GSite. I tried the following and I am not sure how to use react-faq-component after it. Could you please help?

index.html

<!-- react faq -->
<script src="https://requirejs.org/docs/release/2.3.6/comments/require.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/build/index.min.js"></script>
<script type="text/babel" data-type="module" src="my.js"></script>

my.js

// this gives error 
const Faq = ReactFaqComponent.Faq;

error

(index):11 Uncaught ReferenceError: ReactFaqComponent is not defined

armenic avatar Mar 05 '21 03:03 armenic