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 / 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-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 / 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 / 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 / react-104.md
Last active October 3, 2022 02:06
React 104 – Controlled components

React 104

Controlled components

  • The state of form elements in an HTML/JavaScript project is tracked by <1>.
  • A controlled component in React is really just a regular <2> that you are already familiar with.
  • But the term refers to a component that has a form element whose <3> is tracked by <4>.
  • The value of an <input />, for example, in a controlled component is set by the <5> part of the useState hook.
  • If an <input /> does not have a <6> attribute, its state is controlled by HTML.
  • Changes in state cause a React component to <7>.
  • When component goes from controlled to uncontrolled, React will throw a <8>.