reading-notes

Code Fellows courses Notes

This project is maintained by QamarAlkhatib

Putting it all together

React Docs - Thinking in React

  1. What is the single responsibility principle and how does it apply to components?

source


  1. What does it mean to build a ‘static’ version of your application?

source


  1. Once you have a static application, what do you need to add?

  1. What are the three questions you can ask to determine if something is state?

according of what I know through the class:

  1. How can you identify where state needs to live?

For each piece of state in your application:


Higher-Order Functions

  1. What is a “higher-order function”?

Functions that operate on other functions, either by taking them as arguments or by returning them


  1. Explore the greaterThan function as defined in the reading. In your own words, what is line 2 of this function doing?

greaterThan function create a new function to check if the value grater than the input one.

line 2 creates a new function that check the current value and the input one.

function greaterThan(n) {
  return m => m > n;
}
let greaterThan10 = greaterThan(10);
console.log(greaterThan10(11));
// → true

  1. Explain how either map or reduce operates, with regards to higher-order functions.

Things I want to know more about