This repository was archived by the owner on May 20, 2025. It is now read-only.
Commit 9f903a9
authored
Fix usage of removed method AppState.removeEventListener (#2385)
AppState.removeEventListener was removed in react-native 0.70, after being
deprecated for over a year. Anybody using react-native 0.70 will experience an
unhandled TypeError when trying to invoke removeEventListener.
Replace the usage of removeEventListener with the `remove()` method on the
subscription returned by addEventListener.
Stop reassigning the resumeListener argument. It's a bad practice to reassign
function arguments, and it is common to have an eslint rule to block this.
Rename the argument to retryOnAppResume so that when we create resumeListener,
there is no reassignment of a function argument.1 parent 47f502d commit 9f903a9
1 file changed
+6
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
180 | 180 | | |
181 | 181 | | |
182 | 182 | | |
183 | | - | |
| 183 | + | |
184 | 184 | | |
185 | 185 | | |
186 | 186 | | |
| |||
209 | 209 | | |
210 | 210 | | |
211 | 211 | | |
212 | | - | |
| 212 | + | |
213 | 213 | | |
214 | 214 | | |
215 | 215 | | |
216 | 216 | | |
217 | | - | |
218 | | - | |
| 217 | + | |
| 218 | + | |
219 | 219 | | |
220 | 220 | | |
221 | 221 | | |
222 | 222 | | |
223 | 223 | | |
224 | | - | |
| 224 | + | |
225 | 225 | | |
226 | | - | |
227 | | - | |
| 226 | + | |
228 | 227 | | |
229 | 228 | | |
230 | 229 | | |
| |||
0 commit comments