K
K
Kirill Gorelov2018-07-09 08:41:52
React
Kirill Gorelov, 2018-07-09 08:41:52

React couple of questions?

Guys, I started to master the recast and ran into some questions that I did not find a more or less unambiguous answer.
1. I am making an application as in this tproger article. And as a result, bootstrap is not applied to me, although it is in packed.json

{
  "name": "weather",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "bootstrap": "^4.1.1",
    "bootswatch": "^4.1.1",
    "react": "^16.4.1",
    "react-bootstrap": "^0.32.1",
    "react-dom": "^16.4.1",
    "react-scripts": "1.1.4"
  },
  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test --env=jsdom",
    "eject": "react-scripts eject"
  }
}

The result is like this.
5b42f4113efe8420545301.png
2. React can be used through the installation, or you can just connect.
<script src="lib/react.js"></script>
        <script src="lib/react-dom.js"></script>
        <script src="lib/babel-browser.min.js"></script>

Which option is better for production?
3. There is a layout with jQuery (completely all scripts). How can I combine this layout with react if react does not work with jquery?
4. I didn’t find it anywhere at all.
Conditionally, I made an application with react. How can I put it on my server and make it available on the domain (example.com). If I run it locally, it works through localhost. Though I can create my domain locally.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anubis, 2018-07-09
@Anubis

1) package.json, not packed.json. In the dependencies of the project there is, in the connections of the project itself - no.
2) For production, importing inside scripts and building into a bundle using Webpack is better
3) Rewrite, cutting out jQuery in principle
4) Nginx, Apache, whatever

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question