Skip to content

Use react-faq-component from CDN #50

@armenic

Description

@armenic

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/react-faq-component@1.3.0/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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions