Answer the question
In order to leave comments, you need to log in
How to include a library in React?
In the header I connect react
<script type="text/javascript" src="/js/react.min.js"></script>
<script type="text/javascript" src="/js/react-dom.min.js"></script>
<script type="text/javascript" src="https://unpkg.com/[email protected]/browser.min.js"></script>
import { Parallax } from 'react-parallax';
Answer the question
In order to leave comments, you need to log in
For ease of getting started, I recommend not to bathe and install one of the dozens of existing boilerplates. For example, https://github.com/facebookincubator/create-react-app
And then figure out how everything works
Here you need either browserify or webpack. I advise Webpack
It will be both correct and easier, even if you include require.js, at the time the code is executed, the module is not loaded yet, but fiddling with events, etc. I do not recommend
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question