Commit 0a5b672
authored
[iOS] Remove a stale TODO in
## Description
Removes two leftovers that reference each other:
- The `TODO use State from RNModule` comment in `src/State.ts`, added in
the TS rewrite (#1327). The idea was to source the `State` object from
the native module's exported constants instead of duplicating the values
in JS. That's no longer viable: the TurboModule spec has no
`getConstants`, web and Jest have no native module to ask, and `as
const` literal types have to exist at compile time anyway.
- The `constantsToExport` method in `RNGestureHandlerModule.mm` (the
`State` and `Direction` dictionaries, exported since 2017) together with
the now-unused `RNGestureHandlerDirection.h` import. Nothing on the JS
side reads these - without `getConstants` in the spec they are
unreachable on the new architecture.
`requiresMainQueueSetup` stays, as module initialization inserts into
the static `_managers` map that component views read on the main thread.
No behavior change.
## Test plan
- Built and ran `basic-example` on the iOS simulator; the app renders
and a tap on the `VirtualGestureDetector` text logs `Tapped on first
part!`.
- Verified nothing references the exported constants: no `getConstants`
in `NativeRNGestureHandlerModule.ts`, no `Module.State` /
`Module.Direction` reads in `src/`.State.ts and the unused constants export (#4457)1 parent bac9b38 commit 0a5b672
2 files changed
Lines changed: 0 additions & 25 deletions
Lines changed: 0 additions & 23 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | 20 | | |
22 | 21 | | |
23 | 22 | | |
| |||
278 | 277 | | |
279 | 278 | | |
280 | 279 | | |
281 | | - | |
282 | | - | |
283 | | - | |
284 | | - | |
285 | | - | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | | - | |
291 | | - | |
292 | | - | |
293 | | - | |
294 | | - | |
295 | | - | |
296 | | - | |
297 | | - | |
298 | | - | |
299 | | - | |
300 | | - | |
301 | | - | |
302 | | - | |
303 | 280 | | |
304 | 281 | | |
305 | 282 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | 1 | | |
4 | 2 | | |
5 | 3 | | |
| |||
0 commit comments