In JavaScript, what is an isomorphic application?
An isomorphic application (aka Universal JavaScript) means that the application can run both on the server and on the client. This can be used to render on the server so that the client can display the content more or less immediately.
What is hoisting in JavaScript?
During the compilation phase of JavaScript execution, keywords (var, let, const, function, class) are allocated locations in memory.
If not assigned an explicit value, declarations with the var keyword also initialized and assigned the value “undefined.” During the execution phase, var-declared variables are available to the parser anywhere within the function scope (if declared within a function) or at the global level if declared outside a function.
All that means that a variable referenced lexically prior to its own declaration is valid and will be executed without error.
What is the difference between var, let, and const?
All are reserved keywords used for declaring variables.
var: the var keyword declares and initializes a variable at the top of its function scope (or in the global scope if declared outside a function).
let and const, on the other hand, declare block-scoped variables (i.e., anything within curly braces { } ). In a sense, variables declared with let and const are also “hoisted” (in that they are allocated space in memory during the compilation phase), but they are not initialized until execution—with var you get “undefined”; with let/const you get “X is not defined.”
What is the practical difference between let and const?
const: const-declared variables cannot have their base value type overwritten.
let: variables declared with let can be changed and updated as needed (for example, during iterations).
What are the basic hooks available in ReactJS?
useEffect - Accepts a function that contains imperative, possibly effectful code.
useState - Returns a stateful value, and a function to update it.
useContext - Accepts a context object (the value returned from React.createContext) and returns the current context value for that context. The current context value is determined by the value prop of the nearest above the calling component in the tree.
What are the three main phases of the React component lifecycle?
What is the useReducer hook?
An alternative to useState. Accepts a reducer of type (state, action) => newState, and returns the current state paired with a dispatch method. (If you’re familiar with Redux, you already know how this works.)
What are the most common React component lifecycle methods?
No. 1
What are the most common React component lifecycle methods?
No. 2
What are the React component lifecycle methods?
No. 3
Triggered automatically after a component is successfully mounted and rendered for the first time. Often used to fetch application data.
What are the React component lifecycle methods?
No. 4
Triggered automatically after a component is successfully updated.
What are the React component lifecycle methods?
No. 5
Triggered automatically right before the component is unmounted and destroyed.
What are the three types of scope in JavaScript?
What are the three types of scope in JavaScript?
True or False
In “Strict Mode” undeclared variables are automatically global in scope.
False.
What is the definition of scope in JavaScript (according to MDN)?
The current context of execution. The context in which values and expressions are “visible” (aka available) and can be successfully referenced. If a variable or expression is not “in the current scope,” it is unavailable for use.
What are the different categories of HTTP headers?
Why is scope important?
What are the different categories of HTTP headers?
What are some ways to make your components more reusable/sharable?
What are some disadvantages of css-in-js?
What are the advantages of css-in-js (with libraries like Styled Components, Linaria, or Emotion)?
What are the steps in HTTP request-response life cycle?
What are the three main components of the HTTP protocol?