Skip to content

Instantly share code, notes, and snippets.

View louisrli's full-sized avatar

Louis louisrli

View GitHub Profile
@louisrli
louisrli / libraries.md
Last active June 22, 2021 11:35
An exercise for students to research some popular JavaScript libraries

Learning Objectives

The objective of this discussion is to expose you to some of the popular frameworks that are built on top of JavaScript or React. The goal is not for you to know how to use these, but simply understand what their intended usage is in case you want to use it at some point in time.

For each of these, I want you to answer the following questions for the class:

  1. Why does this exist? Why did people spend hundreds of hours of their time to build this?
  2. For what types of projects would you use this for?

Questions

  1. Gatsby
  2. Storybook
filetype on
filetype indent on
filetype plugin on
syntax on
set wildmenu
set splitright
let g:goyo_width=110
" Performance reasons, maybe
@louisrli
louisrli / gist:13f52ac417a1eeeae483f48e7317e031
Last active May 21, 2020 14:09
Props and State: Teach each other

React Props and State

Learning Goal

At the end of this activity, you should understand what props and state are and know how to use them. How? You'll teach each other!

You'll be in pairs.

  • Person 1: Responsible for props
  • Person 2: Responsible for state
@louisrli
louisrli / gist:5b7753027b83bab1233186c07f925184
Created May 21, 2020 13:39
Props and State: Teach each other
# React Props and State
## Learning Goal
At the end of this activity, you should understand what props and state are and know how to use them. How? You'll teach each other!
You'll be in pairs.
* **Person 1:** Responsible for props
* **Person 2:** Responsible for state
@louisrli
louisrli / gist:3ab3f898d8c96a095415cce90cb964c9
Created May 21, 2020 13:39
Props and State: Teach each other
# React Props and State
## Learning Goal
At the end of this activity, you should understand what props and state are and know how to use them. How? You'll teach each other!
You'll be in pairs.
* **Person 1:** Responsible for props
* **Person 2:** Responsible for state
@louisrli
louisrli / gist:ea6182b7ac913360d1fddbd9d16d5fb8
Created May 21, 2020 13:39
Props and State: Teach each other
# React Props and State
## Learning Goal
At the end of this activity, you should understand what props and state are and know how to use them. How? You'll teach each other!
You'll be in pairs.
* **Person 1:** Responsible for props
* **Person 2:** Responsible for state
@louisrli
louisrli / gist:41a3cd40e35b9d3344e300a4976c8f97
Last active May 21, 2020 13:39
Props and State: Teach each other
# React Props and State
## Learning Goal
At the end of this activity, you should understand what props and state are and know how to use them. How? You'll teach each other!
You'll be in pairs.
* **Person 1:** Responsible for props
* **Person 2:** Responsible for state
@louisrli
louisrli / components.md
Last active May 16, 2020 11:22
Component Activity

Goal

The goal of this activity is to create a reusable component in React.

Requirements

Write a React class or function component (your choice) that represents a project that you completed.

It should take the following props:

  • Project name
  • Project description

Predicting Constructor Effects

Questions

class Rectangle {
  constructor(sideA, sideB) {
    this.sideA = sideA;
    this.sideB = sideB;
    this.area = sideA * sideB;

Quiz: Reviewing JavaScript Object Orientation

???

Reviewing JavaScript Object Orientation

?:

class Tree {