style(types): remove deprecated uses of non-root react-native imports WIP#831
style(types): remove deprecated uses of non-root react-native imports WIP#831
Conversation
|
To view this pull requests documentation preview, visit the following URL: docs.page/invertase/react-native-google-mobile-ads~831 Documentation is deployed and generated using docs.page. |
|
Saw this from a long while back - this may be related to "events coalescing" --> https://github.com/invertase/react-native-google-mobile-ads/pull/646/changes - not sure how that functions in New Architecture but it was a problem before |
…yed by one event?
bb3c5aa to
9aff9c3
Compare
|
Updated to rebase out the commits from PRs this was built on now that they are in main No attempt has been made to re-qualify the event behavior after the merge Baseline testing was done on the commits that went in to main and the delayed-event behavior I mention did not occur there, so if it is still observed in this PR, it is from changes in this PR. If someone has the chance to test this PR and they don't see the behavior then this is good to go after fixing the Jest tests |
|
Hello 👋, this PR has been opened for more than 2 months with no activity on it. If you think this is a mistake please comment and ping a maintainer to get this merged ASAP! Thanks for contributing! You have 15 days until this gets closed automatically |
759bc81 to
394fe44
Compare
Description
react-native is deprecating uses of deep imports from their types, they are movings towards exporting everything you need via the
react-nativeexport directlyThis PR attempts to move to that API
Note: I observed some incorrect test behavior after adopting this, related to the EventEmitter port. I had to switch to NativeEventEmitter as a type / object and it appears to emit the events, but not at the right time
Specifically, the problem I saw was:
tests:android:runafter installing and building etcadb logcat | grep ReactNatieJSso you can see the hook state changing as events happenExpected: all the events are emitted as they happen and the hook updates (and logs) that state changed
Actual: it appeared the events sometimes - and most frequently with the "closed" state change, did not get emitted on time but were delayed. Specifically, that close state change did not show up when I closed it but it did show up for the interstitial hook test after I opened one of the other hook tests
Are the events queueing somewhere so they emit in a batch ? Is there something else going on ?
I don't know.
Future investigation should involve putting some logging into the native code to log when the native code emits the events into the react-native emitter chain, to identify which macro chunk of the system is failing, then go from there
Related issues
Release Summary
Don't merge until the events thing is fixed
Checklist
and followed the process outlined there for submitting PRs.
AndroidiOSe2etests added or updated in__tests__e2e__jesttests added or updated in__tests__Test Plan
watch
ReactNativeJSlogcat tags while testing hook state changes to make sure event emission is workingThink
react-native-google-mobile-adsis great? Please consider supporting the project with any of the below:Invertaseon Twitter