Documenting my learning journey of Namaste React Live Course conducted by Akshay Saini
Emmet is a plug-in for many popular text editors which greatly improves HTML & CSS. Emmet short hand expression can be used to generate HTML markup and css. Most useful emmet abbreviations are :
HTML
html:5
- generates html5 boilerplateui>li
- nested elementsh1.#heading.container.con
- create h1 element with id heading and classes container and condiv[data-name=harshi]
- Custom attributeheader+div+footer
- generate siblings
CSS
m10-10-10-10
- Margin on all sides margin: 10px 10px 10px 10px;
Library
- collection of pre-defined helper functions, objects, classes, modules that can be used in code to boost the development.
By using a library, you can control the flow of the application and call the library.
Eg: React, JQuery, Lodash
Framework
- Foundation upon which applications are built.
In contrast, when you use a framework, the control is inverted, i.e., the framework controls the flow and calls your code.
Eg: Node JS, Angular, Spring
A CDN also called a content distribution network, is a group of geographically distributed and interconnected servers. They provide cached internet content from a network location closest to a user to speed up its delivery.
React
was developed for applications (Facebook) that have constantly changing data. Since React is a front-end framework or the View
in MVC, this means that as the user clicks around and changes the app's data,
the view should react
or change with those user events.
The crossorigin attribute provides support for CORS
, defining how the element handles cross-origin requests. CORS stands for Cross-Origin Resource Sharing. If cross-origin is set to "user-credential", then user authentication is required to access the file.
React
library contains functionality utilised in web and mobile apps (react native). ReactDOM
library contains functionality utilised in web browser. It contains DOM manipulation utilities.
react.production.js
- production code of react library that is minified and production ready.
react.development.js
- More readable and developer friendly react library code that can be used to debug.
Without async/defer
: Browser stops the html parsing once script tag is encountered.
It resumes parsing only after script is fetched and executed.
Async
: Html parsing is done in parallel while scripts are being fetched from the network and executed.
Once the script is done with execution, html parsing is resumed. This can be used for external scripts like google analytics.
It is better to avoid async for scripts that are dependent on other scripts since we dont know in which order script will be executed.
Defer
: Similar to async, Html parsing is done in parallel while scripts are being fetched from the network. But scripts are executed only after the
html parsing is done.