-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix native modules not being re-initialized on reload #6159
Conversation
When calling `ReactNativeHost::ReloadInstance()`, `ReactPackageProvider`s are not reiterated and thus not calling `AddAttributedModules()`. As a consequence, the native modules that were loaded the first time the app was loaded, no longer "exist" after a reload.
@acoates-ms: I hit this issue while trying to figure out why my |
@vmoroz - Seems good to me but want you to check. This also seems bad. I'm surprised other people haven't hit it. It probably needs backporting? |
@acoates-ms instance reload was IIRC very unreliable in MSRN until 0.63. We didn't really hear feedback on it, so I'm kind of curious what development workflow looks like for the average RNW user. |
@acoates-ms - yes, the change is good. We did the same in private repo for the CodePush implementation. @tido64, thank you for fixing it! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @vmoroz! Because this pull request has the Do note that I've been instructed to only help merge pull requests of this repository that have been opened for at least 10 hours, a condition that will be fulfilled in about 7 hours 36 minutes. No worries though, I will be back when the time is right! 😉 p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
@tido64, please run |
Thanks for the super quick review ❤️ |
* Fix native modules not being re-initialized on reload When calling `ReactNativeHost::ReloadInstance()`, `ReactPackageProvider`s are not reiterated and thus not calling `AddAttributedModules()`. As a consequence, the native modules that were loaded the first time the app was loaded, no longer "exist" after a reload. * Change files
When calling `ReactNativeHost::ReloadInstance()`, `ReactPackageProvider`s are not reiterated and thus not calling `AddAttributedModules()`. As a consequence, the native modules that were loaded the first time the app was loaded, no longer "exist" after a reload.
When calling `ReactNativeHost::ReloadInstance()`, `ReactPackageProvider`s are not reiterated and thus not calling `AddAttributedModules()`. As a consequence, the native modules that were loaded the first time the app was loaded, no longer "exist" after a reload.
When calling `ReactNativeHost::ReloadInstance()`, `ReactPackageProvider`s are not reiterated and thus not calling `AddAttributedModules()`. As a consequence, the native modules that were loaded the first time the app was loaded, no longer "exist" after a reload.
When calling `ReactNativeHost::ReloadInstance()`, `ReactPackageProvider`s are not reiterated and thus not calling `AddAttributedModules()`. As a consequence, the native modules that were loaded the first time the app was loaded, no longer "exist" after a reload.
When calling `ReactNativeHost::ReloadInstance()`, `ReactPackageProvider`s are not reiterated and thus not calling `AddAttributedModules()`. As a consequence, the native modules that were loaded the first time the app was loaded, no longer "exist" after a reload.
When calling
ReactNativeHost::ReloadInstance()
,ReactPackageProvider
s are not reiterated and thus not callingAddAttributedModules()
. As a consequence, the native modules that were loaded the first time the app was loaded, no longer "exist" after a reload.Microsoft Reviewers: Open in CodeFlow