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

Undeprecate UIManagerProvider in the new architecture #47386

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import com.facebook.proguard.annotations.DoNotStrip;
import com.facebook.react.bridge.queue.ReactQueueConfiguration;
import com.facebook.react.common.ReactConstants;
import com.facebook.react.common.annotations.DeprecatedInNewArchitecture;
import com.facebook.react.common.annotations.FrameworkAPI;
import com.facebook.react.common.annotations.UnstableReactNativeAPI;
import com.facebook.react.turbomodule.core.interfaces.CallInvokerHolder;
Expand All @@ -30,7 +29,10 @@
* CatalystInstance. If you need to create a ReactContext within an "bridge context", please create
* BridgeReactContext.
*/
@DeprecatedInNewArchitecture
@Deprecated(
since =
"BridgeReactContext is deprecated, please to migrate to new architecture using"
+ " [com.facebook.react.defaults.DefaultReactHost] instead.")
public class BridgeReactContext extends ReactApplicationContext {
@DoNotStrip
public interface RCTDeviceEventEmitter extends JavaScriptModule {
Expand Down Expand Up @@ -255,10 +257,8 @@ public CallInvokerHolder getJSCallInvokerHolder() {
return null;
}

@DeprecatedInNewArchitecture(
message =
"This method will be deprecated later as part of Stable APIs with bridge removal and not"
+ " encouraged usage.")
@Deprecated(
since = "This method is deprecated, please use UIManagerHelper.getUIManager() instead.")
/**
* Get the UIManager for Fabric from the CatalystInstance.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ package com.facebook.react.bridge

import com.facebook.proguard.annotations.DoNotStrip
import com.facebook.react.bridge.queue.ReactQueueConfiguration
import com.facebook.react.common.annotations.DeprecatedInNewArchitecture
import com.facebook.react.common.annotations.VisibleForTesting
import com.facebook.react.internal.turbomodule.core.interfaces.TurboModuleRegistry
import com.facebook.react.turbomodule.core.interfaces.CallInvokerHolder
Expand All @@ -20,6 +19,9 @@ import com.facebook.react.turbomodule.core.interfaces.NativeMethodCallInvokerHol
* the invocation of JavaScript methods and lets a set of Java APIs be invocable from JavaScript as
* well.
*/
@Deprecated(
message =
"This class is deprecated, please to migrate to new architecture using [com.facebook.react.defaults.DefaultReactHost] instead.")
@DoNotStrip
public interface CatalystInstance : MemoryPressureListener, JSInstance, JSBundleLoaderDelegate {
public fun runJSBundle()
Expand Down Expand Up @@ -117,21 +119,18 @@ public interface CatalystInstance : MemoryPressureListener, JSInstance, JSBundle
*/
public val nativeMethodCallInvokerHolder: NativeMethodCallInvokerHolder

@DeprecatedInNewArchitecture(
@Deprecated(
message =
"This method will be deprecated later as part of Stable APIs with bridge removal and not" +
" encouraged usage.")
"This method is deprecated, please to migrate to new architecture using [com.facebook.react.defaults.DefaultReactHost] instead.")
public fun setTurboModuleRegistry(turboModuleRegistry: TurboModuleRegistry)

@DeprecatedInNewArchitecture(
@Deprecated(
message =
"This method will be deprecated later as part of Stable APIs with bridge removal and not" +
" encouraged usage.")
"This method is deprecated, please to migrate to new architecture using [com.facebook.react.defaults.DefaultReactHost] instead.")
public fun setFabricUIManager(fabricUIManager: UIManager)

@DeprecatedInNewArchitecture(
@Deprecated(
message =
"This method will be deprecated later as part of Stable APIs with bridge removal and not" +
" encouraged usage.")
"This method is deprecated, please to migrate to new architecture using [com.facebook.react.defaults.DefaultReactHost] instead.")
public fun getFabricUIManager(): UIManager?
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,10 @@

package com.facebook.react.bridge

import com.facebook.react.common.annotations.DeprecatedInNewArchitecture

/**
* {@link UIManagerProvider} is used to create UIManager objects during the initialization of React
* Native. This was introduced as a temporary interface to enable the new renderer of React Native
* in isolation of others part of the new architecture of React Native.
* Native.
*/
@DeprecatedInNewArchitecture
public fun interface UIManagerProvider {

/* Provides a {@link com.facebook.react.bridge.UIManager} for the context received as a parameter. */
Expand Down
Loading