ACA halfway into React

Will McClure
Apr 7, 2021

Why is setState() in React async instead of sync?

If it was synchronous the amount of requests being made could leave the browser unresponsive. It is set as async to improve the user experience and performance of the application.

What is a higher order component?

It reuses other component’s logic to create a new component. Ex:
const awesomeNewComponent = higherOrderComponent(initialComponent);

How does hoisting work in JavaScript?

“a JavaScript mechanism where variables and function declarations are moved to the top of their scope before code execution.” — Understanding Hoisting in Javascript

--

--