Skip to content
Closed
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 packages/react-native/React/Base/RCTDisplayLink.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@
- (instancetype)init;
- (void)invalidate;
- (void)registerModuleForFrameUpdates:(id<RCTBridgeModule>)module
withModuleHolder:(id<RCTDisplayLinkModuleHolder>)moduleHolder;
withModuleHolder:(id<RCTDisplayLinkModuleHolder>)moduleHolder
__attribute__((deprecated(
"registerModuleForFrameUpdates is part of the legacy architecture and will be removed in a future React Native release.")));
- (void)addToRunLoop:(NSRunLoop *)runLoop;

@end
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ import com.facebook.react.devsupport.interfaces.DevSupportManager
import com.facebook.react.module.annotations.ReactModule

/** Native module for JS timer execution. Timers fire on frame boundaries. */
@Deprecated(
"TimingModule is part of the legacy architecture and will be removed in a future React Native release."
)
@ReactModule(name = NativeTimingSpec.NAME)
public class TimingModule(
reactContext: ReactApplicationContext,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,9 @@ void RCTInstanceSetRuntimeDiagnosticFlags(NSString *flags)
sRuntimeDiagnosticFlags = [flags copy];
}

@interface RCTBridgelessDisplayLinkModuleHolder : NSObject <RCTDisplayLinkModuleHolder>
__attribute__((deprecated(
"RCTBridgelessDisplayLinkModuleHolder is part of the legacy architecture and will be removed in a future React Native release.")))
@interface RCTBridgelessDisplayLinkModuleHolder : NSObject<RCTDisplayLinkModuleHolder>
- (instancetype)initWithModule:(id<RCTBridgeModule>)module;
@end

Expand Down Expand Up @@ -457,9 +459,12 @@ - (void)_start

[strongSelf->_delegate instance:strongSelf didInitializeRuntime:runtime];

// Set up Display Link
// Set up Display Link
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
id<RCTDisplayLinkModuleHolder> moduleHolder = [[RCTBridgelessDisplayLinkModuleHolder alloc] initWithModule:timing];
[strongSelf->_displayLink registerModuleForFrameUpdates:timing withModuleHolder:moduleHolder];
#pragma clang diagnostic pop
[strongSelf->_displayLink addToRunLoop:[NSRunLoop currentRunLoop]];

// Attempt to load bundle synchronously, fallback to asynchronously.
Expand Down
Loading