Skip to content

Update the RNW and RN versions to the latest #11

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

Merged
merged 2 commits into from
Apr 22, 2021

Conversation

BartoszKlonowski
Copy link
Member

@BartoszKlonowski BartoszKlonowski commented Apr 22, 2021

This pull request closes #2

It updates the versions of both React Native and React Native Windows to the latest.


The version update procedure is described in the release note of 0.64.0 version, but it guides the developer to create new project and move the sources to the newer and empty one.
But this approach is more problematic, than just running the reactnative-windows-init in the existing directory.
So for this project the following steps were made to bump the version:

  1. Run the npx react-native-windows-init --overwrite --version "0.64.4" The --overwrite` flag ensures that no matter what file has been already modified in the existing repository, it will be replaced by the file of latest version.
    It also forces the developer to track the missing changes and reapply them in the further steps.
  2. Build the project and run it so there's a stability check.
  3. Edit the .vcxproj file to include all the missing files and pages implemented previously.
    This step includes both including the files, but also setting their properties according to the type and purpose of the file. For example: NotesPage.h should be includes as a header but also should be dependent upon it's XAML implementation.
  4. Apply the changes to the JS side of the app
    It includes all the sources and components, but also re-modifies the index.js file so it keeps the structure of the component from before the update.

After all thee steps it is necessary to rebuild and run the app to double check the migration results.


Why is the official approach more problematic?
The official approach should be quite straightforward when it comes to updating the version of a "pure JS* application, in which case only the JS code should be copied to the latest project. Although it is still not as comfortable and it's more error-prone as the procedure applied in this pull request, it should give the developer the comfort when it comes to the guide-following feeling.
But, in case of this app, there's much code implemented on the native UWP side, which is very difficult to just copy to the latest project. so in this case the better approach is to leave the sources where they are and launch the update in the "legacy" project.

@BartoszKlonowski BartoszKlonowski added C++ Topic relates to the C++ native code enhancement New feature or request labels Apr 22, 2021
@BartoszKlonowski BartoszKlonowski merged commit 95fb97b into main Apr 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C++ Topic relates to the C++ native code enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RN & RNW update - bump version to the latest
1 participant