Skip to content
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

chore: drop React Native 0.64 - 0.67 since 3.30.0 #2036

Merged
merged 2 commits into from
Mar 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ To learn about how to use `react-native-screens` with Fabric architecture, head
- [x] iOS
- [x] Android
- [x] tvOS
- [x] visionOS
- [x] Windows
- [x] Web

Expand Down Expand Up @@ -105,6 +106,7 @@ Screens are already integrated with the React Native's most popular navigation l

| library version | react-native version |
| ------- | -------------------- |
| 3.30.0+ | 0.68.0+ |
| 3.14.0+ | 0.64.0+ |
| 3.0.0+ | 0.62.0+ |
| 2.0.0+ | 0.60.0+ |
Expand Down Expand Up @@ -143,7 +145,7 @@ You are all set 🎉 – when screens are enabled in your application code react

### Experimental support for `react-freeze`

> You have to use React Native 0.64 or higher, react-navigation 5.x or 6.x and react-native-screens >= v3.9.0
> You have to use React Native 0.68 or higher, react-navigation 5.x or 6.x and react-native-screens >= v3.9.0

Since `v3.9.0`, `react-native-screens` comes with experimental support for [`react-freeze`](https://github.com/software-mansion-labs/react-freeze). It uses the React `Suspense` mechanism to prevent parts of the React component tree from rendering, while keeping its state untouched.

Expand Down
11 changes: 2 additions & 9 deletions android/src/main/java/com/swmansion/rnscreens/ScreenContainer.kt
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,9 @@ open class ScreenContainer(context: Context?) : ViewGroup(context) {
override fun removeView(view: View) {
// The below block is a workaround for an issue with keyboard handling within fragments. Despite
// Android handles input focus on the fragments that leave the screen, the keyboard stays open
// in a number of cases. The issue can be best reproduced on Android 5 devices, before some
// changes in Android's InputMethodManager have been introduced (specifically around dismissing
// the keyboard in onDetachedFromWindow). However, we also noticed the keyboard issue happen
// intermittently on recent versions of Android as well. The issue hasn't been previously
// noticed as in React Native <= 0.61 there was a logic that'd trigger keyboard dismiss upon a
// blur event (the blur even gets dispatched properly, the keyboard just stays open despite
// that) – note the change in RN core here:
// https://github.com/facebook/react-native/commit/e9b4928311513d3cbbd9d875827694eab6cfa932
// in a number of cases.
// The workaround is to force-hide keyboard when the screen that has focus is dismissed (we
// detect that in removeView as super.removeView causes the input view to un focus while keeping
// detect that in removeView as super.removeView causes the input view to un-focus while keeping
// the keyboard open).
if (view === focusedChild) {
(context.getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ object ScreenWindowTraits {
activity.requestedOrientation = orientation
}

@SuppressLint("ObsoleteSdkInt") // to be removed when support for < 0.64 is dropped
internal fun setColor(screen: Screen, activity: Activity?, context: ReactContext?) {
if (activity == null || context == null) {
return
Expand Down
Loading