Skip to content

Instantly share code, notes, and snippets.

View samuraijane's full-sized avatar

Matthew Day samuraijane

View GitHub Profile
@samuraijane
samuraijane / publishing-to-npm.md
Last active April 5, 2024 22:41
Publishing to NPM

Blazingly Fast Tips: Publishing to NPM by Matt Pocock

See Note 6 below for changes that have happened since Matt's video was published and Note 7 for a sample repo I created while following his tutorial. The information here is current as of April 5, 2024.

Create a library on your local

  1. 00:06 Create package.json

    "name": "<some-package-name>",
@samuraijane
samuraijane / react-301.md
Last active April 4, 2024 17:48
React 301 - An overview of react-router

React 301

An overview of react-router

  • <1> refers to what the browser shows in the view at a given URL
  • If a url ends in a <2>, it means that routing is controlled by the server
  • react-router is an NPM library
  • One advantage of <3> routing is the site is faster
  • When the browser handles routing, it means we can avoid sending additional requests to the <4>
  • One challenge we have with browser-side routing is dealing with to <5>
  • You can think of routing is a <6> relationship
@samuraijane
samuraijane / css-107.md
Last active January 28, 2023 13:31
CSS 107 - Alignment

CSS 107

Alignment

Key terms and phrases

  1. horizontal
  2. vertical

Starter code

HTML

@samuraijane
samuraijane / css-106.md
Last active January 28, 2023 13:31
CSS 106 – Text

CSS 106

Text

Key terms and phrases

  1. color
  2. font-family
  3. font-size

Starter code

HTML

@samuraijane
samuraijane / css-105.md
Last active January 28, 2023 13:30
CSS – Box dimensions

CSS 105

Box dimensions

Key terms and phrases

  1. height
  2. width

Starter code

HTML

@samuraijane
samuraijane / css-104.md
Last active January 28, 2023 13:29
CSS 104 – Spacing

CSS 104

Spacing

Key terms and phrases

  1. border
  2. box model
  3. margin
  4. padding
@samuraijane
samuraijane / css-103.md
Last active January 27, 2023 13:20
CSS 103 – Flow and position

CSS 103

Flow and position

Key terms and phrases

  1. element levels
    • block
    • inline
    • inline block
  2. flow
  3. position
@samuraijane
samuraijane / css-101.md
Last active January 26, 2023 23:36
CSS 101 - Selectors and style rules

CSS 101

Selectors and style rules

Key terms and phrases

  1. class attribute
  2. colon
  3. curly braces
  4. dev tools
  5. id attribute
  6. link tag, and its attributes href and rel
@samuraijane
samuraijane / css-102.md
Last active January 25, 2023 02:00
CSS 102 - Specificity and inheritance

CSS 102

Specificity and inheritance

Key terms and phrases

  1. !important
  2. inline styles
  3. inheritance
  4. specificity
@samuraijane
samuraijane / redux-101.md
Last active November 4, 2022 00:03
Redux 101 – An overview of managing global state

Redux 101

An overview of managing global state

  • When we talk about <1>, we mean variables that can be accessed throughout the application regardless of what the view may be
  • With React and its useState hook, state is managed locally– that is, the state variables are exposed only within the component where they are defined
  • As such, they are specifically tied the component's corresponding <2> in the browser
  • This type of architecture is known as <3>
  • The <4> means the data, as defined by the state of a variable or variables, available to the view
  • The <5> is the data that is rendered in the browser at a given point in time
  • And the <6> is the logic that decides if the model should change