Skip to content

Commit

Permalink
BridgelessUIManager: Finish configureNextLayoutAnimation (#42211)
Browse files Browse the repository at this point in the history
Summary:

According to [LayoutAnimation.js](https://github.com/facebook/react-native/blob/2b63b9bba98cfe142581b47cc20bd3068e3e4281/packages/react-native/Libraries/LayoutAnimation/LayoutAnimation.js#L78-L101), UIManager.configureNextLayoutAnimation can just delegate to FabricUIManager.

Changelog: [Internal]

Reviewed By: fkgozali

Differential Revision: D52347537
  • Loading branch information
RSNara authored and facebook-github-bot committed Jan 10, 2024
1 parent 30e86e3 commit 3612a05
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import type {UIManagerJSInterface} from '../Types/UIManagerJSInterface';

import {unstable_hasComponent} from '../NativeComponent/NativeComponentRegistryUnstable';
import Platform from '../Utilities/Platform';
import {getFabricUIManager} from './FabricUIManager';
import nullthrows from 'nullthrows';

function raiseSoftError(methodName: string, details?: string): void {
Expand Down Expand Up @@ -230,7 +231,12 @@ const UIManagerJS: UIManagerJSInterface & {[string]: any} = {
callback: () => void,
errorCallback: (error: Object) => void,
): void => {
raiseSoftError('configureNextLayoutAnimation');
const FabricUIManager = nullthrows(getFabricUIManager());
FabricUIManager.configureNextLayoutAnimation(
config,
callback,
errorCallback,
);
},
};

Expand Down

0 comments on commit 3612a05

Please sign in to comment.