Welcome to React! React helps you build modern web applications.
For getting started an React application you needs two things as Prerequisites.
Before you begin, make sure your development environment includes Node and an npm package manager.
Install Node.js using downloaded file
To check your node version, run node -v in a terminal/console window.
CLI (command line interface), and React apps depend on features and functionality provided by libraries that are available as npm packages. To download and install npm packages, you must have an npm package manager.
This Quick Start uses the npm client command line interface, which is installed with Node.js by default. To check that you have the npm client installed, run npm -v in a terminal/console window.
For better understanding React we suggest you to once go through official documentation of React from reactjs.org
If you want Cuba theme setup then directly follow next Cuba setup section
Run the npm command create-react-app and provide the name my-app, as shown here:
npx create-react-app my-app
The create-react-app command prompts you for information about features to include in the initial app project. Accept the defaults by pressing the Enter or Return key.
Go to the workspace folder (my-app).
cd my-app
Launch the server by using the npm command npm start
npm start
Build you application for host on server using below command:
npm run build
It will create one dist file in your theme folder. Make zip of dist folder. so here you are ready to upload your theme on server.
If you’re using Apache HTTP Server, you need to create a .htaccess file in the public folder by pastng below code
Options -MultiViews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.html [QSA,L]
Now upload your dist folder on public folder
If you have already download and install node.js then ignore prerequisites accordingly.
Download latest version of node.js from nodejs.org.
Install Node.js using downloaded file
To check your node version, run node -v in a terminal/console window.
cd theme
npm install
npm start