Skip to content

Commit

Permalink
add readme immutability example
Browse files Browse the repository at this point in the history
  • Loading branch information
EmanuelQuintino committed Dec 5, 2023
1 parent af86599 commit e3759f2
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions 6-React/class-03-states/README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
# Class 03 States

### Rendering Flow
## Immutability

An immutable value is one whose content cannot be changed without creating an entirely new value.

## Rendering Flow

- When the status changes
- When the property changes
- When parent component renders
- Passing function is different from executing (infinite rendering)

### The key must be unique and not random
## Key Props

The key must be unique and not random

<pre>
["A", "B", "C", "D", "E"]
Expand All @@ -17,7 +23,7 @@
0, 1, 2, 3, 4
</pre>

### Closures
## Closures

A closure is the combination of a function bundled together (enclosed) with references to its surrounding state (the lexical environment). In other words, a closure gives you access to an outer function's scope from an inner function. In JavaScript, closures are created every time a function is created, at function creation time.

Expand Down

0 comments on commit e3759f2

Please sign in to comment.