What is library and difference between library and framework?
Library is a collection of helper modules , classes , objects , functions , pre-written code , etc. A bunch of code packed together that can be used repeatedly is known as Library
A library is easy to be replaced with another library
A framework is a supporting structure that gives shape to your code.
It comprises of lot of APIs , compilers , support programs , libraries etc
It is difficult to replace frameworks
Why React?
React is a free, open-source JavaScript library for building User Interfaces. It is used to build single-page applications and allows you to create reusable UI components
React is a JavaScript library developed by Facebook that allows you to write user interfaces and create apps
Single Page Application
A Single Page Application (SPA) is a web app that loads content dynamically without refreshing the whole page. It uses JavaScript to update only the required parts of the screen based on user actions. This creates a smooth, fast, and app-like user experience.
Eliminates full page reloads for better performance
Sends and updates only the necessary data from the server
Provides a more responsive and seamless interface
NPM(Node Package Manager)
NPM (Node Package Manager) is the default package manager for Node.js. It helps manage project dependencies, scripts, and third-party libraries, and is automatically installed when you install Node.js.
It is mainly used to manage packages or modules, these are pre-built pieces of code that extend the functionality of your NodeJS application.
The NPM registry hosts millions of free packages that you can download and use in your project.
NPM is installed automatically when you install NodeJS, so you don’t need to set it up manually
we can create react file using npm. It has multiple framework and it enable us to choose the framework that suits for us. When the file is being created it also create a folder called node_modules which has all the supporting files for the code to use
What is Build Tool?
Frameworks like React use advanced features that browsers don’t natively support
React relies on JSX (JavaScript XML), which needs to be transpiled into regular JavaScript(TBD JSX)
build tool is a software utility that automates the process of converting your development code JSX into an optimized version that a web browser can actually understand and run efficiently
Vite:
Vite (French for "fast") has replaced older tools like Create React App (CRA) as the industry standard due to its speed and modern approach
Top comments (0)