GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — learning-react/chapter-03 at second-edition · cpchrispack/learning-react

Expand file tree

/

chapter-03

/
Copy path

Directory actions

More options

More options

Directory actions

More options

More options

Latest commit

 

History

History
History
 
 
/

chapter-03

/
Copy path

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
01-functional-javascript
01-functional-javascript
 
 
02-imperative-vs-declarative
02-imperative-vs-declarative
 
 
03-immutability
03-immutability
 
 
04-pure-functions
04-pure-functions
 
 
05-transforming-data
05-transforming-data
 
 
06-higher-order-functions
06-higher-order-functions
 
 
07-recursion
07-recursion
 
 
08-composition
08-composition
 
 
readme.md
readme.md
 
 

readme.md

Outline

Chapter 3 : Functional Programming with JavaScript

Many techniques in React follow the functional JavaScript paradigm. Understanding the basic concepts of functional programming will make you better at structuring React applications.

Samples

Introduction

What it means to be Functional

  1. Functions as Variables (run it)
  2. Arrow Functions (run it)
  3. Object Methods (run it)
  4. Functions within Arrays (run it)
  5. Functions as Arguments (run it)
  6. Returned Functions (run it)
  7. ES6 Enhancements (run it)

Imperative vs. Declarative

  1. Imperative (run it)
  2. Declarative (run it)

Immutability

  1. Mutations (run it)
  2. Object.assign() (run it)
  3. Spread Operator with Objects (run it)
  4. Array.push() (run it)
  5. Array.concat() (run it)
  6. Spread Operator with Arrays (run it)

Pure Functions

  1. Impure Function (run it)
  2. Object Mutation (run it)
  3. Pure Function (run it)
  4. Side Effects (run it)
  5. React Component (run it)

Transforming Data

  1. Joining Array Items (run it)
  2. Filtering Arrays (run it)
  3. Filtering Array Function (run it)
  4. Mapping Arrays (run it)
  5. Creating Objects with .map() (run it)
  6. Updating Array of Objects (run it)
  7. Editing Arrays of Objects (run it)
  8. Object.keys() (run it)
  9. Reducing Arrays (run it)
  10. Array.reduce() Shorter Syntax (run it)
  11. Colors Hash (run it)
  12. distinctColors() (run it)

Higher Order Functions

  1. invokeIf (run it)
  2. userLogs (run it)

Recursion

  1. Countdown (run it)
  2. Countdown with setTimeout (run it)
  3. deepPick() (run it)

Composition

  1. Clock Template with .replace() (run it)
  2. Clock with Composition (run it)
  3. Click with Compose Function (run it)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.