Skip to content

Latest commit

 

History

History
99 lines (77 loc) · 7.38 KB

RESOURCES.md

File metadata and controls

99 lines (77 loc) · 7.38 KB

Resources

Library Documentation

React Basics

React Intermediate

React Advance

React Professionals

Keep Reviewing - Easily Forgettable

Truthy and Falsy

  • In JavaScript, there are two types of values: truthy and falsy.

  • Truthy values are values that evaluate to true when used in boolean context while falsy values evalute to false.

  • The following values are falsy in JavaScript: false, 0, -0, NaN, null, undefined, and "" (Empty String).

  • All other values are truthy.

Short Circuiting

  • Short Circuiting is a feature of the logical operators (&&, ||) in JavaScript that allows them to return a value without evaluating the whole expression.
  • It works by evaluating an expression from left to right and returning the value of the first operand that determines the final result.
  • For example, in the expression false && true, the && operator will return false as soon as it evaluates the first operand, false. This is because the && operator returns true if both the operands are true.

Logical AND (&&)

  • In a logical operation involving && (AND), if the first operand is falsy, JavaScript will short-circuit and return the first operand without evaluating the second operand. If the first operand is truthy, JavaScript will return the second operand.

Logical OR (||)

  • In a logical operation involving || (OR), if the first operand is truthy, JavaScript will short-circuit and return the first operand. If the first operand is falsy, JavaScript will return the second operand.

NULLISH COALESCING Operator (??)

  • The NULLISH COALESCING Operator (??) is a logical operator that returns its right-hand side operand when its left-hand side operand is null or, undefined otherwise returns its left-hand side operand.

Some Important Points about React

  • React uses JSX and JSX is Declarative (Focuses on the program's goal or end result, without specifying how to get there.) whereas Manual DOM element selections and DOM traversing is Imperative (Focuses on how the program should achieve its goal, by explicitly specifying each step, or instruction, that changes the program's state. Imperative programming is similar to pseudocode).

Credits

These resources are from the Udemy Course The Ultimate React Course 2024: React, Next.js, Redux & More by Jonas Schmedtmann.