Skip to content

Instantly share code, notes, and snippets.

The Context API

The Context API allows you to reference state set on a higher level component from a lower level component. The Context API replaces "prop drilling" as a simpler way to reference state from nested components.

Create a Provider

Set a component named Provider (technically you can name it anything) at the top level component of your app. Provider is the name that is conventionally used for this component.

Start a new node app:

npm init.

In package.json set a key/value of "private":true AND set scripts to {"test":"jest"}

ECMAScript 6 (ES6)

The technical name of the JavaScript language is ECMAScript. ECMA stands for the European Computer Manufacturers Association. This is the organization that oversees the standardization process of the JavaScript language.ECMAScript version 6 (ES6 for short) is a newer version of JavaScript. In this module, you will learn about some of the features of ES6 including:

  • Imports/Exports
  • Default function arguments
  • The let and const keywords
  • Template literals
  • The rest parameter
# Parts of a Class
The class name
The attributes (properties of the class). The properties have this format:
```
-name: string
-age: int
-id: -int

Parts of a Class

The class name

The attributes (properties of the class). The properties have this format:

-name: string
-age: int
-id: -int

Parts of a Class

The class name

The attributes (properties of the class). The properties have this format:

-name: string
-age: int
-id: -int

Built in web server

Go to directory of project

php -S localhost:8000

Sever Side s Client Side Rendering

Server side

Client side

Svelte Notes