I am new in React JS. I have started with React Boilerplate.
I have a js file
and want to use that file globally, so whenever I was trying to add a js file with script tag <script src='' type='text/javascript'></script>
in index.html, it throwing an error
Uncaught SyntaxError: Unexpected token <.
So any suggestion?
Note: Import js file in each component is working but I don't want to include it in every component repeatedly. I don't have any knowledge on webpack.
You can put JS File in assets folder, then import it in App.js
This will be available in index.js.