react-native-macos/React
Janic Duplessis 41343f6a73 BREAKING - RCTEvent improvements, remove deprecated [sendInputEventWithName:body:] (#15894)
Summary:
This makes the RCTEvent protocol more generic to make it easier to use the event coalescing feature for type of events other than components. This does a few other improvements that will be useful in follow up PRs.

- Add `RCTComponentEvent` which is used instead of deprecated `[sendInputEventWithName:body:]` and remove that method completely (was only used at 2 places).
- Make `coalescingKey` optional for events that return NO from `canCoalesce`.
- Make `viewTag` optional for events that are not related to views.
- Fast path for events that return NO from `canCoalesce`.
- Add a missing test for event coalescing with different view tags.

Ended up making only one PR for all this since the changes are related and hard to separate.

**Migration**
Use a custom RCTEvent subclass with `[sendEvent:]` (preferred way to allow type safe events) or `RCTComponentEvent`.

**Test plan**
- Ran RCTEventDispatcher unit tests
- Tested manually in RNTester

Changelog:

[iOS] [Changed] - Remove deprecated RCTEvent method, sendInputEventWithName:body:
Pull Request resolved: https://github.com/facebook/react-native/pull/15894

Reviewed By: shergin

Differential Revision: D13726194

Pulled By: hramos

fbshipit-source-id: 11f63a99e08f46ec6b4f16f8d9949cdbf5c3fe13
2019-03-27 11:20:22 -07:00
..
Base BREAKING - RCTEvent improvements, remove deprecated [sendInputEventWithName:body:] (#15894) 2019-03-27 11:20:22 -07:00
CxxBridge Refactor JSIExecutor to use runtimeInstaller for injecting the logger instance 2019-03-25 09:12:11 -07:00
CxxModule Silence Xcode warning (#23880) 2019-03-12 22:08:21 -07:00
CxxUtils Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
DevSupport TM iOS: disable remote debugging toggle when TurboModule is active 2019-03-01 14:30:35 -08:00
Fabric Add lock for surface presenter observers (#24052) 2019-03-26 09:56:40 -07:00
Inspector Don't reconnect inspector if connection refused (#22625) 2019-02-21 12:52:39 -08:00
Modules Fire timers in the background via NSTimer (#23674) 2019-03-26 12:24:37 -07:00
Profiler Fix PerfMonitor appearance when reloading JS (#24073) 2019-03-21 03:21:15 -07:00
React.xcodeproj BREAKING - RCTEvent improvements, remove deprecated [sendInputEventWithName:body:] (#15894) 2019-03-27 11:20:22 -07:00
UIUtils Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
Views BREAKING - RCTEvent improvements, remove deprecated [sendInputEventWithName:body:] (#15894) 2019-03-27 11:20:22 -07:00
React-Core.podspec Split React.podspec into separate podspecs for each Xcode project (#23559) 2019-02-21 18:35:44 -08:00
React-DevSupport.podspec Split React.podspec into separate podspecs for each Xcode project (#23559) 2019-02-21 18:35:44 -08:00
React-RCTFabric.podspec Fabric: working podspecs & works in RNTester (#23803) 2019-03-15 23:59:22 -07:00
third-party.xcconfig Upgrade folly to v2018.10.22.00 for iOS (#21976) 2018-10-29 12:13:11 -07:00