Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Support Reanimated 2 * Turbo Modules support * New layout system on iOS. Layout insets are now handled via constraints and `safeAreaLayoutGuide` instead of margins and `edgesForExtendedLayout` as per Apple's recommendations. This change should be transparent to you and won't affect your apps. * Android development is now done on Hermes. While JSC is still supported, we will no longer support it officially and encourage you to migrate your projects to Hermes. * Deprecate `registerComponentWithRedux`. Use [registerComponent](https://wix.github.io/react-native-navigation/api/component#registering-a-component-wrapped-with-providers) with providers instead. * Switch to Hermes to support TurboModules + bump compile and target sdk Closes #6454
- Loading branch information
Showing
85 changed files
with
1,187 additions
and
910 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
lib/android/app/src/main/java/com/reactnativenavigation/utils/View.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package com.reactnativenavigation.utils | ||
|
||
import android.view.View | ||
import androidx.core.view.doOnLayout | ||
import kotlin.coroutines.resume | ||
import kotlin.coroutines.suspendCoroutine | ||
|
||
suspend fun View.awaitPost() = suspendCoroutine<Unit> { cont -> | ||
post { cont.resume(Unit) } | ||
} | ||
|
||
inline fun View.doOnLayoutCompat(crossinline action: (view: View) -> Unit) { | ||
if (isLaidOut || (width > 0 && height > 0)) action(this) else doOnLayout { action(this) } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.