This is our fork of React Native, to integrate various bugfixes that require re-building all the native components.
Let's say we're on React Native 0.62.2, and encounter a React Native issue that has been fixed in 0.64. We have two options:
- Upgrade to 0.64, or
- Backport the patch
Upgrading a version often takes half a day, so if it's a small patch, it's often easier to just release.
- Checkout
master - Download the patch by:
- Getting the link to the commit on GitHub (e.g., https://github.com/facebook/react-native/commit/123423c2a9258c9af25ca9bffe1f10c42a176bf3)
- Adding
.patchto it (e.g., https://github.com/facebook/react-native/commit/123423c2a9258c9af25ca9bffe1f10c42a176bf3.patch)
- Apply the patch
cd react-native git apply 1234.patch git commit -m 'Same message as upstream, preferably'
- Adding a line to WanderlogPatches.md about where we got the patch from and the commit that references it, and then commit that.
See https://gitlab.com/travelchime/itineraries/-/blob/master/mobile/PATCHING_REACT_NATIVE.md
See https://gitlab.com/travelchime/itineraries/-/blob/master/mobile/PATCHING_REACT_NATIVE.md
- Check
WanderlogPatches.md:- Run:
git checkout master git pull git remote add upstream git@github.com:facebook/react-native.git git fetch upstream master git rebase -i upstream/master
- For patches that have Pull Requests that have now been merged into upstream, you can omit/DROP them
- Otherwise, try to resolve any merge conflicts
- Run:
- Clean up
WanderlogPatches.mdby removing any patches/commits that you omitted/DROPped - Commit any changes to
WanderlogPatches.mdyou made