I would like to include a JS library into my react app. This is really frustrating to include a simple script tag. However I am a newbie in react so might be I am doing an incorrect way.
The library is a TradingView library downloaded from Github. For this I tried many method but I am failed to include. After inclusion the correct path goes to 404. Let me explain what I did:
- I put the library code in root folder and created a relative path and put the code in
componentdidmount
through document.createElement method. - I created an hook and included that but its going to 404. Ref: link
- Tried with
React-Helmet
but same error. Ref: link
There are some more method I tried but none of them is working. Please help me out.