score:1

you can make react components without a build step, to do you need to add the following to you html page

<script src="https://unpkg.com/react@16/umd/react.development.js"></script>
<script src="https://unpkg.com/react-dom@16/umd/react-dom.development.js"></script>
<script src="https://unpkg.com/babel-standalone@6.15.0/babel.min.js"></script>

score:4

in order to upload file on server, you need to have prod build(not necessary but will makes thing light and easy for you). you can get prod build by running npm build.

before doing that, make sure your component will be mounted on actual element in your html page. update the following code reactdom.render( <your component />, document.getelementbyid('<id of your element in your pure html page>') );

now, build your project. a build/static folder will be created in your project folder. upload that to your server and update your index.html as in head: <link href="/static/css/<main css file, actual name can be found in static/css/>" rel="stylesheet">

in body: <script type="text/javascript" src="/static/js/<main js name found in static/js/>"></script>


Related Query

More Query from same tag