From d378dcd99ac9795de385aabf9d925258e82da2af Mon Sep 17 00:00:00 2001 From: Vladimir Guguiev Date: Thu, 2 Aug 2018 18:31:51 +0200 Subject: [PATCH 1/2] Add "dont use this.send in componentWillUnmount" section to README --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 8d58a7d..fbbc8ae 100644 --- a/README.md +++ b/README.md @@ -99,6 +99,11 @@ ReComponent comes with four different types of [effects](https://github.com/phil By intelligently using any of the four types above, it is possible to transition between states in one place and without the need to use `setState()` manually. This drastically simplifies our mental model since changes must always go through the reducer first. +**NOTE!** +You should NEVER call `this.send` or any sender in **`componentWillUnmount`**. +If you need to execute a side-effect in **`componentWillUnmount`** (e.g. clear a timer) call that side-effect directly. + + ## FAQ ### Advantages Over `setState` From ecdb4258fd09bad573237d9bba63cd87a0500c40 Mon Sep 17 00:00:00 2001 From: Vladimir Guguiev Date: Fri, 3 Aug 2018 09:37:57 +0200 Subject: [PATCH 2/2] fix README formatting --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index fbbc8ae..496273d 100644 --- a/README.md +++ b/README.md @@ -103,7 +103,6 @@ By intelligently using any of the four types above, it is possible to transition You should NEVER call `this.send` or any sender in **`componentWillUnmount`**. If you need to execute a side-effect in **`componentWillUnmount`** (e.g. clear a timer) call that side-effect directly. - ## FAQ ### Advantages Over `setState`