DEV Community

Hermes
Hermes

Posted on

3 2

React Series - #1 [ Intro ]

I've decided to dive into React and will be making a blog-series on react as I learn it.

Note: Take a look atthis post first to get a feel of some JavaScript syntax that is used in React.

React is a popular JavaScript library used mostly in building user-interfaces.

Let's have a look at what a React application(not really an app) looks like:

First, To setup a simple react-environment, make sure node-js is installed, then open the terminal and navigate(in-terminal) to a directory where you would like the react-project to be in then write this command in the terminal

npx create-react-app name-of-project

This will use a package "create-react-app"( used for generating react projects ) to generate a react project in a folder "name-of-project". It downloads the react library along with some other dependencies and useful tools, then sets up a template for a project.

With the react environment successfully setup there should be a couple of folders like 'public, src, node_modules'.
public: holds static files like the html files
src: holds the react source code we're working on
node_modules: holds dependencies of the project

Delete the files in 'src' folder and then create a fresh js file in there called 'index.js' and we can begin to code in React.

Hostinger image

Get n8n VPS hosting 3x cheaper than a cloud solution

Get fast, easy, secure n8n VPS hosting from $4.99/mo at Hostinger. Automate any workflow using a pre-installed n8n application and no-code customization.

Start now

Top comments (0)

SurveyJS custom survey software

JavaScript Form Builder UI Component

Generate dynamic JSON-driven forms directly in your JavaScript app (Angular, React, Vue.js, jQuery) with a fully customizable drag-and-drop form builder. Easily integrate with any backend system and retain full ownership over your data, with no user or form submission limits.

Learn more