Skip to main content

Encapsulation โ†” (Paradigm) to pack properties & methods into component, to keep private and restrict access (unless expose via API)

aka Encapsulate

TypeScript extends JavaScript classes through private & protected

Naming convention for protected variables via prefixed _ or __ - notifies other programmers of private variable

Referencesโ€‹

  1. Component โ†” ๐ŸงฑComposable code to Encapsulate, Reuse & return React Element Fiber via JSX

  2. Wrapper โ†” Object to wrap & Encapsulate data

  3. Separation of Concerns โ†” (Paradigm) to Encapsulate (Software) into dintinct modular sections vs purpose/logic

  4. @mixin โ†” At-Rule to Encapsulate Style Rule with optional args

  5. Block โ†” Source Code Encapsulate in { } curly braces (excl Object Literals) to define boundary of Lexical Environment