Skip to content

Instantly share code, notes, and snippets.

// ================================================================================
// You will be writing a series of functions beneath each block of comments below.
// Tackle each function one at a time. You may move on to a new exercise and return
// later. Run the code and the console to the right will tell you if your function
// is successfully passing the tests.
// ================================================================================
/*
Define a function named `kmToMiles` that receives one parameter:

Application State Design Pattern

  1. Create User Stories list (from Agile Development).
  2. Use a branch to implement the feature.
  3. Build a state object for all user interactions.
  4. Write state modifications for all actions.
  5. Write a render function that reads the global state object and draws all necessary elements.
  6. Write event listeners for user actions. Each listener should
    1. Retrieve DOM info if applicable.
  7. Invoke a state modification function.
-- 1. Get all restaurants
SELECT * FROM restaurants;
-- 2. Get Italian restaurants
SELECT * FROM restaurants WHERE cuisine = 'Italian';
-- 3. Get 10 Italian restaurants, subset of fields
SELECT id, name FROM restaurants LIMIT 10;
-- 4. Count of Thai restaurants
https://github.com/thinkful-ei20/jeffrey-react-header-bar
https://github.com/thinkful-ei20/jeffrey-react-address-book
https://github.com/thinkful-ei20/jeffrey-react-surprise
https://github.com/thinkful-ei20/jeffrey-react-rate-calculator
https://github.com/thinkful-ei20/jeffrey-react-live-search
https://glitch.com/edit/#!/sedate-board?path=src/index.js:1:0
https://glitch.com/edit/#!/tart-niece?path=src/index.js:1:0

You Don't Know JS

Code

A program, often referred to as source code or just code, is a set of special instructions to tell the computer what tasks to perform.

Statements

In a computer language, a group of words, numbers, and operators that performs as a specific task is a statement.

a = b * 2
https://glitch.com/edit/#!/flame-yew?path=src/index.js:14:0
https://glitch.com/edit/#!/resolute-veterinarian?path=src/index.js:14:0
  1. Create React Application
create-react-app react-app
  1. Setup Redux
npm install redux react-redux redux-thunk
  1. Create Store