@@ -506,8 +506,8 @@ and [**deep-freeze**](https://github.com/substack/deep-freeze) to make sure my c
506
506
These are loaded from [@Substack](https://github.com/substack)'s CDN: https://wzrd.in
507
507
508
508
"Let's say that I want to implement a **counter** ***list*** application.
509
- I would need to write a few function that operate on its' state and
510
- its' state is an ` Array ` of JavaScript *Numbers* representing the individual counters."
509
+ I would need to write a few function that operate on its state and
510
+ its state is an ` Array ` of JavaScript *Numbers* representing the individual counters."
511
511
512
512
The first function I want to write is called addCounter
513
513
and all it should do is to *append* a zero at the end
@@ -1544,7 +1544,7 @@ To gain a *deeper* understanding of how *exactly* `combineReducers` works
1544
1544
we will *implement* it ***from scratch*** in this lesson.
1545
1545
1546
1546
` combineReducers ` is a function so I'm writing a function declaration
1547
- and its' only argument is the *mapping* between ` state ` keys
1547
+ and its only argument is the *mapping* between ` state ` keys
1548
1548
and the reducers, so I'm just going to call it ` reducers ` .
1549
1549
1550
1550
` ` ` js
@@ -1565,7 +1565,7 @@ const combineReducers = (reducers) => {
1565
1565
};
1566
1566
` ` `
1567
1567
1568
- The returned value is supposed to be a reducer its' self
1568
+ The returned value is supposed to be a reducer itself
1569
1569
so this is a function that returns another function
1570
1570
and the signature of the returned function is a reducer signature
1571
1571
it has the ` state ` and the ` action `
@@ -2159,7 +2159,7 @@ the root reducer will *use* this new field as part of its *new*
2159
2159
its going to get this *new* `state` `Object`
2160
2160
and pass all its keys as props to the `TodoApp` Component
2161
2161
so the `TodoApp` Component will receive the todos
2162
- and the *updated* `visibilityFilter` as its' props
2162
+ and the *updated* `visibilityFilter` as its props
2163
2163
both its props are passed to the `getVisibleTodos` function
2164
2164
which calculates the *currently* `visibleTodos`
2165
2165
according to a list of *all* `todos` and the `visibilityFilter`
@@ -2589,7 +2589,7 @@ such as what happens when the **Add** `<button>` is clicked
2589
2589
how the todos are selected
2590
2590
what happens when a * single * ` Todo` has been clicked
2591
2591
and what happens when a ` Footer` Link is clicked .
2592
- And the components such as ` AddTodo` , the ` TodoList` , the ` Todo` its ' self
2592
+ And the components such as ` AddTodo` , the ` TodoList` , the ` Todo` itself
2593
2593
the ` Footer` and the ` FilterLink` they don ' t dispatch actions
2594
2594
they call their callbacks [passed] in the props
2595
2595
so they are *only* responsible for the *looks* but not for the behavior.
@@ -2705,7 +2705,7 @@ As a "*Container*" Component the `FilterLink`
2705
2705
doesn' t have its * own * markup
2706
2706
and it delegates rendering to the ` Link`
2707
2707
" *Presentational*" Component .
2708
- In this case it *calculates* its' ` active` prop
2708
+ In this case it * calculates * its ` active` prop
2709
2709
by comparing its * own * ` filter` prop
2710
2710
with the ` visibilityFilter` in the Redux ` store` ` state` .
2711
2711
The ` filter` prop is the one that is passed
@@ -2837,7 +2837,7 @@ inside its `render` method.
2837
2837
Instead of specifying the DOM tree
2838
2838
it delegates all the rendering to
2839
2839
the `Link` "*Presentational*" Component
2840
- and its' only job is to calculate the props
2840
+ and its only job is to calculate the props
2841
2841
base on its *own* props and the *current* `state` of the Redux `store`
2842
2842
and it also specifies the callbacks that are
2843
2843
going to dispatch the `actions` on the `store`.
@@ -2857,7 +2857,7 @@ and can be used inside the "*Presentational*" Components such as
2857
2857
to get the data from the `store` and specify the behavior
2858
2858
this lets us keep the `Footer` Component simple
2859
2859
and de-coupled from the behavior and data
2860
- that its ' child Components need.
2860
+ that its child Components need.
2861
2861
2862
2862
2863
2863
> Code at the *end* of Video 22:
@@ -2950,7 +2950,7 @@ componentWillUnmount() {
2950
2950
Just like the ` FilterLink` the ` VisibleTodoList` is
2951
2951
going to * subscribe * to the ` store`
2952
2952
and * force * an update any time the ` store` ` state` changes
2953
- because it uses the ` state` in its ' `render` method.
2953
+ because it uses the ` state` in its ` render` method .
2954
2954
Now that the ` VisibleTodoList` is connected to the Redux ` store`
2955
2955
we can use it * instead * of the ` TodoList`
2956
2956
and we no longer have to pass all the props from the top .
@@ -3035,7 +3035,7 @@ rendering **3** different `FilterLink`s.
3035
3035
The `FilterLink` is a *Container* Component
3036
3036
so it *subscribes* to the `store`
3037
3037
and it renders the *Presentational* Component called `Link`
3038
- calculating weather it should be *active* based on its' props
3038
+ calculating weather it should be *active* based on its props
3039
3039
the *current* Redux `store` `state`
3040
3040
and it specifies the *behavior*
3041
3041
(*what happens when it's clicked*).
@@ -3150,7 +3150,7 @@ Note that this change did not change the behavior or *data* flow
3150
3150
of this application.
3151
3151
The *Container* Components ` subscribe` to the ` store`
3152
3152
just like *before* and update their ` state`
3153
- in response to its' changes,
3153
+ in response to its changes,
3154
3154
however what changed is how they *access* the ` store` .
3155
3155
Previously they would *access* a top-level variable
3156
3156
but this approach does not *scale*
@@ -3184,7 +3184,7 @@ but there is *another* way using the "*advanced*" React feature
3184
3184
called "***Context***".
3185
3185
3186
3186
I'm creating a *new* Component called ` Provider`
3187
- and from its' ` render` method it just returns what ever its' *child* is.
3187
+ and from its ` render` method it just returns what ever its *child* is.
3188
3188
So we can *wrap* any Component in a ` Provider`
3189
3189
and it's going to ` render` that Component.
3190
3190
@@ -3288,7 +3288,7 @@ to the `FilterLink` so it receives the relevant *Context*
3288
3288
from the ` Provider` .
3289
3289
Now that the ` FilterLink` receives the ` store` by ` context`
3290
3290
I no longer need to pass it as a ` prop`
3291
- so I ' m removing its' usage (* from the ` Footer` Component* )
3291
+ so I'm removing its usage (*from the ` Footer` Component*)
3292
3292
and I'm also removing the ` store` prop from the ` Footer`
3293
3293
because it doesn't need to pass it down anymore.
3294
3294
@@ -3302,7 +3302,7 @@ We *start* by *rendering* the `TodoApp`
3302
3302
inside the ` Provider` Component we defined above.
3303
3303
The ` Provider` Component just *renders*
3304
3304
what ever you pass to it
3305
- so in this case it renders its' " *Children*"
3305
+ so in this case it renders its "*Children*"
3306
3306
or [*more specifically*] the ` TodoApp` component
3307
3307
however it also provides the ` context`
3308
3308
to *any* Components inside it, including "*Grand Children*"
@@ -3445,7 +3445,7 @@ In the previous lesson I added `ReactRedux` bindings to the project
3445
3445
and I used the ` Provider` Component from ` ReactRedux`
3446
3446
to pass the ` store` down the ` context`
3447
3447
so that the *Container* Components can *read* the ` store`
3448
- from the `context` and `subscribe` to its' changes.
3448
+ from the ` context` and ` subscribe` to its changes.
3449
3449
All *Container* Components are *very similar*,
3450
3450
they need to *re-render* when the ` store` ` state` changes
3451
3451
they need to ` unsubscribe` from the ` store` when they ` Unmount` .
@@ -3627,7 +3627,7 @@ them to something more *specific*:
3627
3627
+ `mapDispatchToProps` becomes `mapDispatchToTodoListProps`
3628
3628
3629
3629
Which you don't *have* to do in your code,
3630
- if you keep each Component in its' *own* file (which is considered to be a best practise ).
3630
+ if you keep each Component in its *own* file (which is considered to be a best practise ).
3631
3631
3632
3632
I will also remove the line-breaks here
3633
3633
to make it *clear* that these functions are only relevant
@@ -3741,7 +3741,7 @@ as a `function` so that the Component can read it from the `props`
3741
3741
and use it without worrying about *context*
3742
3742
or specifying `contextTypes`.
3743
3743
However it is *wasteful* to even `subscribe` to the `store`
3744
- if we don't calculate any `props` from its' `state`,
3744
+ if we don't calculate any `props` from its `state`,
3745
3745
so I'm *replacing* the `mapStateToProps` function with a `null`,
3746
3746
which tells `connect` that there is *no need*
3747
3747
to `subscribe` to the `store`.
@@ -3992,7 +3992,7 @@ this is what I call an `action` *Creator* because
3992
3992
it takes the arguments *about* the ` action `
3993
3993
and it returns the ` action ` ` Object `
3994
3994
with the ` type : ' SET_VISIBILITY_FILTER' `
3995
- and the ` filter ` its' self .
3995
+ and the ` filter ` itself .
3996
3996
3997
3997
` ` ` js
3998
3998
const setVisibilityFilter = (filter ) => {
0 commit comments