mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Add reload to ReactHostInterface (#38698)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/38698 Add reload to ReactHostInterface changelog: [internal] internal Reviewed By: rshest Differential Revision: D47915444 fbshipit-source-id: f423b7daf2f086370c80b3135c2139315e32c9f5
This commit is contained in:
committed by
Facebook GitHub Bot
parent
7e44d2cca4
commit
4e44fda261
+2
-1
@@ -427,7 +427,8 @@ public class ReactHost implements ReactHostInterface {
|
||||
* tap on reload button)
|
||||
* @return A task that completes when React Native reloads
|
||||
*/
|
||||
public Task<Void> reload(String reason) {
|
||||
@Override
|
||||
public TaskInterface<Void> reload(String reason) {
|
||||
final String method = "reload()";
|
||||
if (ReactFeatureFlags.enableBridgelessArchitectureNewCreateReloadDestroy) {
|
||||
return Task.call(
|
||||
|
||||
+11
-1
@@ -82,5 +82,15 @@ interface ReactHostInterface {
|
||||
* errors occur during initialization, and will be cancelled if ReactHost.destroy() is called
|
||||
* before it completes.
|
||||
*/
|
||||
fun start(): TaskInterface<Void?>?
|
||||
fun start(): TaskInterface<Void>
|
||||
|
||||
/**
|
||||
* Entrypoint to reload the ReactInstance. If the ReactInstance is destroying, will wait until
|
||||
* destroy is finished, before reloading.
|
||||
*
|
||||
* @param reason [String] describing why ReactHost is being reloaded (e.g. js error, user tap on
|
||||
* reload button)
|
||||
* @return A task that completes when React Native reloads
|
||||
*/
|
||||
fun reload(reason: String): TaskInterface<Void>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user