-
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
refactor(ReactPage): Removing dependency on ReactPage #1445
Conversation
ReactWindows/ReactNative.sln
Outdated
@@ -1,6 +1,6 @@ | |||
Microsoft Visual Studio Solution File, Format Version 12.00 | |||
# Visual Studio 14 | |||
VisualStudioVersion = 14.0.25420.1 | |||
# Visual Studio 15 |
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.
We can do this in a separate PR.
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.
doesn't CodePush use the ReactPage type as a way to hook in via reflection and do its thing? @pre10der89 brought this up some months ago as a barrier to refactoring in this area.
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.
@matthargett your memory is correct... The code push module does take the react page type as a dependency to gain access to the concrete type react instance...
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.
It's not a firm barrier. CodePush will continue to work for older versions of RNW. For newer versions, it will need to be updated. I'll try to make sure the CodePush update happens before this lands in an official version.
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.
This will actually make the CodePush implementation more straightforward.
f6be28d
to
94fae97
Compare
Codecov Report
@@ Coverage Diff @@
## master #1445 +/- ##
==========================================
- Coverage 31.82% 31.69% -0.14%
==========================================
Files 263 266 +3
Lines 19078 19160 +82
Branches 1589 1597 +8
==========================================
Hits 6072 6072
- Misses 12855 12937 +82
Partials 151 151
Continue to review full report at Codecov.
|
ReactPage is not the right abstraction for managing the lifecycle of React Native. In theory, React Native can run from a background state (with no pages involved), or can be embedded into a UserControl / ContentControl to run multiple React instances simultaneously. This changeset adds ReactNativeHost to manage the lifecycle of the ReactInstanceManager.
ReactPage is not the right abstraction for managing the lifecycle of React Native. In theory, React Native can run from a background state (with no pages involved), or can be embedded into a UserControl / ContentControl to run multiple React instances simultaneously.
This changeset adds ReactNativeHost to manage the lifecycle of the ReactInstanceManager.