Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use react-faq-component from CDN #50

Open
armenic opened this issue Mar 5, 2021 · 0 comments
Open

Use react-faq-component from CDN #50

armenic opened this issue Mar 5, 2021 · 0 comments

Comments

@armenic
Copy link

armenic commented Mar 5, 2021

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant