reading-notes


Project maintained by mr-atta Hosted on GitHub Pages — Theme by mattgraham

react

Passing Functions to Components

## How do I pass an event handler (like onClick) to a component? ♥️from

Like <button onClick={this.handleClick}> then we need create a function in the class (📍 globle). ` handleClick() { console.log(‘Click happened’); }`

Lists and Keys

## 🗺️ map : Array.prototype.map()

The map() method creates a new array populated with the results of calling a provided function on every element in the calling array. ♥️from returns a map object of the results after applying the given function to each item map

The Spread Operator …

Pass Functions

### In the video, what is the first step that the developer does to pass functions between components?