From 9007b137ca576d330917334135fd420616d1577f Mon Sep 17 00:00:00 2001 From: Elizabeth Craig Date: Thu, 28 Feb 2019 00:05:25 -0800 Subject: [PATCH 1/5] More day 1 updates --- step1-01/js-demo/README.md | 4 +- step1-02/exercise/README.md | 2 +- step1-06/demo/README.md | 12 +++- step1-06/exercise/README.md | 6 +- .../final/src/components/TodoListItem.tsx | 3 +- step1-07/demo/README.md | 66 ++++++++++--------- step1-07/demo/src/components/TodoListItem.tsx | 2 +- step1-07/exercise/README.md | 21 ++++-- step2-08/demo/src/components/TodoHeader.tsx | 2 +- 9 files changed, 67 insertions(+), 51 deletions(-) diff --git a/step1-01/js-demo/README.md b/step1-01/js-demo/README.md index 3343979..1713430 100644 --- a/step1-01/js-demo/README.md +++ b/step1-01/js-demo/README.md @@ -63,7 +63,7 @@ function displayMatches() { ### Iteration -Next we'll update our function to iterate through a string of letters. We loop over each letter using the [`for of`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...of) syntax. We'll use real input later, but for now this varifies that our function is working. +Next we'll update our function to iterate through a string of letters. We loop over each letter using the [`for of`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...of) syntax. We'll use real input later, but for now this verifies that our function is working. ```js function displayMatches() { @@ -90,7 +90,7 @@ function displayMatches() { } ``` -> In JavaScript, it's safest to use strict `===` for comparisons, because `==` will try to convert the operands to the same type (and sometimes the behavior is [not what you'd expect](https://www.youtube.com/watch?v=et8xNAc2ic8)). For example, `"1" == 1` is true whereas `"1" === 1` would be false. +> In JavaScript, it's safest to use strict `===` for comparisons, because `==` will try to convert the operands to the same type. For example, `"1" == 1` is true whereas `"1" === 1` is false, but the behavior in certain other cases is [not what you'd expect](https://www.youtube.com/watch?v=et8xNAc2ic8). (See [this video](https://www.destroyallsoftware.com/talks/wat) for more strange JavaScript behavior.) ### Interacting with the DOM diff --git a/step1-02/exercise/README.md b/step1-02/exercise/README.md index b5c4e8d..a3769f1 100644 --- a/step1-02/exercise/README.md +++ b/step1-02/exercise/README.md @@ -4,7 +4,7 @@ 2. Add 4 list items with class `todo` inside of that list with the following content `` 3. Add a span and a button to your footer -4. Span content should be `4 items left` and button should say `Clear Completed` and have a class of `submit` 5. Go into the CSS file and add `display: flex` to the footer. Also add `flex-grow:1` to the span inside of the footer > Hint: Look back at the CSS demo to see the various ways you can use selectors to target existing HTML diff --git a/step1-06/demo/README.md b/step1-06/demo/README.md index 7a61d01..d559ab7 100644 --- a/step1-06/demo/README.md +++ b/step1-06/demo/README.md @@ -99,11 +99,17 @@ In CSS-based styling, visual states are applied by adding and removing classes. #### Adding a Controlled Input -In traditional HTML forms, users interact with the form, and on submit, those values are captured and transmitted. Those are called **uncontrolled inputs**. +In React, form elements such as ``, `