001-React-installation

 

I) installation:

https://www.freecodecamp.org/news/react-for-beginners-handbook/

run msdos

in C;//

run the command: - This creates the working folder

npm create vite@5.1.0 my-alorya-app -- --template react

II) to start vite.js

run in msdos:

  • cd my-alorya-app
  • change folder with cd my-app - in msdos

This installs the app in the folder:

  • npm install

Run Vite.js: 

  • npm run dev

With vite all is ready! - 

Watch out : 

  • There should be no errors in the installation (red text). 
  • If there are any, you should correct them.

creating project (without vite.js)

I recommend you just use vite.js and not the following, I found them too comples, and I had many errors to correct.

Run the code - 

Run them if you do not use vite.js - if you use vite.js you don`t need them

    • npm init -y
  • install react libraries
    • npm install react@^17.0.0 react-dom@^17.0.0 --save
  • install babel
    • npm install @babel/preset-env @babel/preset-react @babel/core @babel/plugin-proposal-class-properties -D

resolving many things:

forum answer

III) deploying to website

  • edit package.json
    • insert :
    • "homepage": "http://art.alorya.com/",
    • close
  • npm run build
  • Open your file explorer
  • click the `dist` folder to open it
  • copy what is inside
  • paste to your website
  • Done!!!
source: https://www.youtube.com/watch?v=10DjQrT-QyU

Comments