How do I add an online module/library to my React file?

37 Views Asked by At

I'm working with React on VS Code after loading the template with

npx create-react-app app

I'm trying to add a CDN Marked 2.1.3

but I don't know where to put it. Normally with regular html, css, JavaScript I would do

<script src="https://cdnjs.cloudflare.com/ajax/libs/marked/2.1.3/marked.js" anonymous" referrerpolicy="no-referrer"></script>

to the head or body tag

But with React, it doesn't work when added

0

There are 0 best solutions below