Skip to main content

Command Palette

Search for a command to run...

React - Unplugged !

Published
•3 min read•View as Markdown
React - Unplugged !
D

Embracing the cosmos and unity into the coding world in quest of learning .

Hey Everyone ! I have started learning #React from Chai Aur Code(Hitesh Choudhary ) and i would say that man is a story teller and i get connected to him very easily the way he teaches is mind blowing .

Starting of learning React one must know the difference between the frameworks and libraries , Frameworks is like an army that have to follow some rules and regulations made earlier while libraries can set their own rules and can also make changes .

You are not a developer if you are not learning from documentation , seeing the React docx , I came to know much about the bundlers such as Vite and Parcel .

React has two types :

1) ReactDOM :

  • Purpose: Used for web applications.

  • Description: React DOM is a package that provides the methods and components necessary for React to interact with the Document Object Model (DOM) of a web page. It's the bridge between React components and the HTML elements rendered on a webpage.

2) React Native :

  • Purpose: Used for mobile applications (iOS and Android).

  • Description: React Native is a framework that allows you to build mobile applications using React and JavaScript. It enables the creation of native mobile components, allowing developers to write code once and deploy it on both iOS and Android platforms, while still delivering a native user experience.

Everything is fine but why we have to learn React can't we just do our simple JS and all the html , css part what was the problem there ?
**Above question is valid as websites created from the React will turn everything into the html,css and js as our enviornment into the browser can understand the basic components only .

We learn React to make our work faster and it benefits us by its

  • Component-based Architecture

  • State Management

  • Virtual DOM

  • One - way data binding approach

How to make a project using Vite+React ?

  • before creating projects lets talk about npm , npx and jsx

  • NPM : (Node Package Manager) as the name itself says it manages and distributes Node.js packages and helps to Maintain Dependency management , install node packages which can be use in reusable block of codes , Version Control and Scripts .

  • NPX : (node package eXecute )npx is a package runner tool that comes with npm. It allows you to execute binaries from Node modules as if they were installed globally, without actually installing them globally. Its features is to run commands from npm packages .

  • JSX : (Javascript XML) it allows you to write HTML code into your javascript and making it easier to describe what the UI should look like.

npm create vite@latest myfirstreactapp
// it will create a folder which will have many packages and the source
 // to run your react file :
npx run dev // dev is located into the script tag
//you can install the uninstalled package by writing :
npm install

Thanks for reading and Stay Tuned for more React Unplugged blogs 😊 .
Share your feedbacks and help me to improve .