How do you ensure methods have the correct this context in React component classes?

In JavaScript classes, the methods are not bound by default. This means that their this context can be changed (in the case of an event handler, to the element that is listening to the event) and will not refer to the component Continue reading How do you ensure methods have the correct this context in React component classes?

What is HTML5 Web Storage? What is localStorage and sessionStorage!

With HTML5, web pages can store data locally within the user’s browser. The data is stored in name/value pairs, and a web page can only access data stored by itself. Differences between localStorage and sessionStorage regarding lifetime: Data stored through localStorage is permanent: it does not Continue reading What is HTML5 Web Storage? What is localStorage and sessionStorage!

What is the difference between HTML and React event handling?

In HTML, the attribute name is in all lowercase and is given a string invoking a function defined somewhere: In React, the attribute name is camelCase and are passed the function reference inside curly braces: In HTML, false can be returned to Continue reading What is the difference between HTML and React event handling?

What are defer and async attributes on a Script tag?

If neither attribute is present, the script is downloaded and executed synchronously, and will halt parsing of the document until it has finished executing (default behavior). Scripts are downloaded and executed in the order they are encountered. The defer attribute downloads the Continue reading What are defer and async attributes on a Script tag?