-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[sdk] Fix FacebookAds module (avoid re-rendering, update native regis…
…tration correctly) This fixes two issues with the FacebookAds module on master: - Avoids re-rendering when the native ad views are mounted. We need to subscribe to mounting events to get the native node handles and previously we were storing those node handles in component state, which triggers re-renders on state updates. We don't want to re-render since it sets new `ref` functions, which updates node handles in component state, which re-renders, etc. Avoiding the state updates is more efficient. - Fix native registration updates -- the ad trigger view change check was inverted. Test plan: open the FacebookAds example in NCL and verify we don't get warnings and that the trigger views open the advertising app in Safari and don't warn.
- Loading branch information
Showing
2 changed files
with
56 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters