Skip to content

Latest commit

 

History

History
65 lines (39 loc) · 2.66 KB

File metadata and controls

65 lines (39 loc) · 2.66 KB

Inceptions

1. What is Emmet

Emmet is a tool that expands short abbreviations into full HTML/CSS code.

2. Difference between a Library and a Framework

Library :
A library is a collection of pre-written code that helps perform specific tasks. I use the library when I need it, meaning I’m in control of when and how to use it.

Example: React – I build UI components with it, but I decide the structure and flow.

Framework:
A framework gives me a ready-made structure along with tools and rules to build efficient and scalable applications. Here, the framework controls the overall flow and calls my code where needed.

Example: Next.js – It provides routing, rendering, API handling, etc. I just plug my logic into it.

3. What is CDN? Why do we use it?

CDN stands for Content Delivery Network, that delivers by using network static content like js, css, images,etc, from the nearest server to improve loading speed and performance.

4. Why react is called react?

React is named react because it reacts to state and data changes to update ui efficiently.

React reacts -- thats the point

5. CrossOrigin Attribute ?

The crossorigin attribute enables CORS(Cross-Origin Resource Sharing) to load external js files from another origin.

6. Difference between React and ReactDOM

React : is the core library used to build UI components. It handles the logic, state, and structure of the user interface.

ReactDOM : connects those components to the actual DOM in the browser. It provides methods to mount, update, and unmount components in the actual DOM.

7. What is react.development.js and react.production.js?

development = debug, production = performance.

react.development.js : It includes warnings, error messages, and extra checks to help with debugging.

react.production.js : It’s minified and optimized for performance by removing all development-related code and warnings.

8. Difference between async and defer ?

async and differ are boolean attributes which are used along of script tag to load the externals script efficiently into our app.

async:

  • loads the script in parallel with the HTML parsing.

  • Executes the script immediately after it’s downloaded.

  • HTML parsing is paused during execution.

  • It does not guarantee the order of execution if multiple scripts are present.

  • best for independent scripts like analytics, ads, etc.

defer:

  • loads the script in parallel with the HTML parsing.

  • Executes the script after the HTML is fully parsed.

  • Maintains the execution order of multiple scripts.

  • Best for scripts that depend on DOM.

Code

By vikas singh