Skip to content

Instantly share code, notes, and snippets.

View GraySmith00's full-sized avatar

Gray Smith GraySmith00

View GitHub Profile
@GraySmith00
GraySmith00 / git_cheat-sheet.md
Created April 2, 2018 22:20 — forked from davfre/git_cheat-sheet.md
git commandline cheat-sheet

Module 1

HTML and CSS

HTML 1

HTML 2

Aria: Roles, States, Properties

Javascript

JS 1

JS 2

React

  • React is a client-side JavaScript framework that allows you to easily and efficiently manipulate the DOM based on application data and how it changes in response to user interaction.

Basic Concepts

  • The Virtual DOM: an in-memory object that represents a DOM structure and can be manipulated with Javascript before updating the actual DOM. This virtual DOM can be updated very quickly and is compared to the actual DOM, in order to only apply changes to the actual DOM and not have to do a complete re-render of the actual DOM.
  • JSX: a mix of JavaScript and XML that enables the developer to write code in what looks like HTML, but is actually JSX. JSX is then compiled down to pure JavaScript code.
  • Components: standalone, independent parts of an application that are responsible for handling a single UI element.
  • Props: arguments that contain data that can be passed down to components.

What Makes React Unique

Basic CSS

Basic Properties

Box Sizing

  • default is content-box, padding and border add to total width and height
  • border-box allows you to include padding and border in items total width and height
box-sizing: content-box | border-box;
@GraySmith00
GraySmith00 / es2015_2016_2017.md
Last active August 14, 2018 19:53
notes for es2015, es2016, and es2017 modern javascript additions

ES 2015

Var / Let / Const

  • var and let variables can be re-assigned, const cannot be re-assigned.
  • var variables are function scoped, but are not constrained by blocks. A var variable defined in a block will be available globally.
  • let and const are block scoped, basically anytime there are curly braces (ex. if statement, for loop)
  • let can be re-assigned, but it cannot be declared twice in the same scope. Var can be declared more than once which can be problematic.

Which one should I use?

  • Wes Bos Method:

Data Types

  • null - intentional absence of value (falsey)
  • undefined - variable without a value (falsey)
  • boolean - true or false
  • string - anything inside quotes
  • number - numbers can be whole numbers, negative, or decimals (different from other languages)
typeof(value) method is useful for determining what type of data a value is // null = object, [] = object
@GraySmith00
GraySmith00 / GraySmithTechnicalPrework.md
Last active April 17, 2018 16:06
Gray Smith Prework for Turing

Gray Smith Technical Prework

Day 1: Computer Setup, HTML, & Gear Up

  1. On a website, what is the purpose of HTML code?

The purpose of Hyper Text Markup Language is to provide the structure of a website.