From b1ce57229e710bf4e38e8509ed079c916a2e8776 Mon Sep 17 00:00:00 2001 From: Brian Vaughn Date: Thu, 22 Feb 2018 16:54:02 -0800 Subject: [PATCH] Typo --- content/blog/2018-02-07-update-on-async-rendering.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/blog/2018-02-07-update-on-async-rendering.md b/content/blog/2018-02-07-update-on-async-rendering.md index b076e7b1d..52a5f068e 100644 --- a/content/blog/2018-02-07-update-on-async-rendering.md +++ b/content/blog/2018-02-07-update-on-async-rendering.md @@ -111,7 +111,7 @@ For this reason, the recommended way to add listeners/subscriptions is to use th You may also need to update subscriptions based on changes in `props`. In this case, you should also wait until `componentDidUpdate` before _removing_ a subscription. In the event that a render is cancelled before being committed, this will prevent us from unsubscribing prematurely. -Howeveer, waiting to unsubscribe means that we will need to be careful about how we handle events that are dispatched in between `getDerivedStateFromProps` and `componentDidUpdate` so that we don't put stale values into the `state`. To do this, we should use the callback form of `setState` and compare the event dispatcher to the one currently in `state`. +However, waiting to unsubscribe means that we will need to be careful about how we handle events that are dispatched in between `getDerivedStateFromProps` and `componentDidUpdate` so that we don't put stale values into the `state`. To do this, we should use the callback form of `setState` and compare the event dispatcher to the one currently in `state`. Here is a example: `embed:update-on-async-rendering/updating-subscriptions-when-props-change-after.js`