Inception Questions

Namaste Coders! , Here are some questions asked in the Inception Episode of Namaste React.

● What is Emmet?

Emmet is a powerful productive tool for the web developers. It allows for faster and more efficient coding by providing shortcuts and abbreviations for writing HTML and CSS code.

● Difference between a Library and Framework?

Library is a cool dude whereas Framework is military.

A library is a collection of reusable code modules or functions that provide specific functionality whereas A framework is a more comprehensive and structured collection of code that provides a foundation for building software applications.

Unlike libraries, frameworks dictate the overall structure, flow, and architecture of an application.

Libraries provide utility functions or tools that developers can use as needed.Frameworks often provide scaffolding or boilerplate code to help developers get started with their projects more quickly.

● What is CDN? Why do we use it?

It is a network of distributed servers strategically located in multiple data centers across the globe. The primary purpose of a CDN is to deliver web content (such as images, videos, scripts, stylesheets, and other static or dynamic assets) to users more efficiently and reliably.

Usage of CDN:

- Faster Content Delivery

- Improved Website Performance

- Reduced Server Load

- Increased Reliability and Availability

- Global Scalability

- Security Enhancements

● Why is React known as React?

React, the JavaScript library for building user interfaces, is known as "React" because of its core concept of "reactive" updates to the user interface.The name "React" reflects its ability to react to changes in the application state and automatically update the user interface to reflect those changes without the need for manual DOM manipulation. This reactive approach to building user interfaces simplifies the development process and improves performance by efficiently updating only the parts of the UI that have changed.

● What is crossorigin in script tag?

The crossorigin attribute is used in HTML <script> tags to specify how the browser should handle loading scripts from external domains when using the Cross-Origin Resource Sharing (CORS) mechanism.

When you include a script from an external domain (a different origin) in your HTML document, the browser makes a cross-origin request to fetch the script file. The crossorigin attribute allows you to control how the browser should handle the request and whether it should include CORS headers in the request.

● What is diference between React and ReactDOM ?

React is the core library for building user interfaces in JavaScript. It provides a component-based architecture for creating reusable UI components and managing their state and lifecycle. React is primarily focused on the logic and structure of UI components.

ReactDOM is a package that provides the integration between React and the Document Object Model (DOM) in the browser. It contains the necessary methods for rendering React components into the DOM and updating them as needed.

● What is difference between react.development.js and react.production.js files via CDN?

When using React via a CDN (Content Delivery Network), you typically have the option to include either the development or production version of the React library. The primary differences between the react.development.js and react.production.js files are related to performance, debugging, and optimizations.

Development vs. Production:

react.development.js: This file contains the development version of the React library. It includes additional warnings, error messages, and debugging information to aid developers during the development and debugging process. This version is larger in size and is not optimized for production use.

react.production.js: This file contains the production version of the React library. It is optimized for performance and stripped of development-specific warnings, error messages, and debugging tools. This version is smaller in size and is intended for use in production environments to minimize bundle size and improve load times.

Performance and Bundle Size:

The development version (react.development.js) includes extra code and checks that are not present in the production version (react.production.js). This additional code adds to the file size of the development version, making it larger than the production version.

The production version (react.production.js) is optimized for performance and has been stripped of unnecessary code and debugging tools, resulting in a smaller file size. This smaller file size reduces the overall bundle size of your application, which can improve load times and performance for end-users.

Debugging and Error Messages:

The development version (react.development.js) includes comprehensive error messages, warnings, and debugging information that are helpful for developers during the development and debugging process. These messages provide valuable feedback and help developers identify and resolve issues in their code more easily.

The production version (react.production.js) does not include the same level of detailed error messages and warnings present in the development version. It is optimized for performance and stripped of debugging tools to reduce file size and improve load times in production environments.

In summary, the choice between using react.development.js and react.production.js via CDN depends on the stage of development and deployment of your application. During development and debugging, you may prefer the development version for its comprehensive error messages and debugging tools. However, for production deployment, it's recommended to use the production version to optimize performance and reduce bundle size.

● What is async and defer?

The End

I hope you enjoyed the article and had a good learning experience.

Follow for more articles and keep sharing👩

Keep coding

Linkedin

hashnode blogs

Did you find this article valuable?

Support akshita garg's blog by becoming a sponsor. Any amount is appreciated!