WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

setLayoutAnimationEnabledExperimental is currently a no-op in the New Architecture #1133

@sttaseen

Description

@sttaseen

Hi! 👋

Thanks for your work on this project!

Today I used patch-package to patch [email protected] for the project I'm working on.

This removes the annoying warning setLayoutAnimationEnabledExperimental is currently a no-op in the New Architecture due to 44da5d2e.

Here is the diff that solved my problem:

diff --git a/node_modules/react-native-gifted-charts/dist/BarChart/Animated2DWithGradient.js b/node_modules/react-native-gifted-charts/dist/BarChart/Animated2DWithGradient.js
index 35c869a..1ca0bb8 100644
--- a/node_modules/react-native-gifted-charts/dist/BarChart/Animated2DWithGradient.js
+++ b/node_modules/react-native-gifted-charts/dist/BarChart/Animated2DWithGradient.js
@@ -20,10 +20,7 @@ import { View, LayoutAnimation, Platform, UIManager, Text } from 'react-native';
 import Svg, { Defs, Rect } from 'react-native-svg';
 import Cap from '../Components/BarSpecificComponents/cap';
 import LinearGradient from '../Components/common/LinearGradient';
-if (Platform.OS === 'android') {
-    UIManager.setLayoutAnimationEnabledExperimental &&
-        UIManager.setLayoutAnimationEnabledExperimental(true);
-}
+
 var Animated2DWithGradient = function (props) {
     var _a, _b;
     var barBackgroundPattern = props.barBackgroundPattern, patternId = props.patternId, bWidth = props.barWidth, barStyle = props.barStyle, item = props.item, index = props.index, opacity = props.opacity, animationDuration = props.animationDuration, noGradient = props.noGradient, noAnimation = props.noAnimation, barInnerComponent = props.barInnerComponent, intactTopLabel = props.intactTopLabel, showValuesAsTopLabel = props.showValuesAsTopLabel, topLabelContainerStyle = props.topLabelContainerStyle, topLabelTextStyle = props.topLabelTextStyle, commonStyleForBar = props.commonStyleForBar, barStyleWithBackground = props.barStyleWithBackground, yAxisOffset = props.yAxisOffset;
diff --git a/node_modules/react-native-gifted-charts/dist/BarChart/RenderStackBars.js b/node_modules/react-native-gifted-charts/dist/BarChart/RenderStackBars.js
index e44dcb4..63dac7f 100644
--- a/node_modules/react-native-gifted-charts/dist/BarChart/RenderStackBars.js
+++ b/node_modules/react-native-gifted-charts/dist/BarChart/RenderStackBars.js
@@ -16,10 +16,7 @@ import Svg, { Defs, Rect } from 'react-native-svg';
 import LinearGradient from '../Components/common/LinearGradient';
 import { useRenderStackBars, BarDefaults, } from 'gifted-charts-core';
 import Tooltip from '../Components/BarSpecificComponents/tooltip';
-if (Platform.OS === 'android') {
-    UIManager.setLayoutAnimationEnabledExperimental &&
-        UIManager.setLayoutAnimationEnabledExperimental(true);
-}
+
 var RenderStackBars = function (props) {
     var _a;
     var barBackgroundPattern = props.barBackgroundPattern, patternId = props.patternId, stackData = props.stackData, item = props.item, index = props.index, containerHeight = props.containerHeight, spacing = props.spacing, rotateLabel = props.rotateLabel, label = props.label, labelTextStyle = props.labelTextStyle, xAxisTextNumberOfLines = props.xAxisTextNumberOfLines, xAxisLabelsVerticalShift = props.xAxisLabelsVerticalShift, renderTooltip = props.renderTooltip, selectedIndex = props.selectedIndex, setSelectedIndex = props.setSelectedIndex, activeOpacity = props.activeOpacity, _b = props.animationDuration, animationDuration = _b === void 0 ? BarDefaults.animationDuration : _b, barBorderWidth = props.barBorderWidth, barBorderColor = props.barBorderColor, stackBorderRadius = props.stackBorderRadius, stackBorderTopLeftRadius = props.stackBorderTopLeftRadius, stackBorderTopRightRadius = props.stackBorderTopRightRadius, stackBorderBottomLeftRadius = props.stackBorderBottomLeftRadius, stackBorderBottomRightRadius = props.stackBorderBottomRightRadius, showValuesAsTopLabel = props.showValuesAsTopLabel, _c = props.autoShiftLabelsForNegativeStacks, autoShiftLabelsForNegativeStacks = _c === void 0 ? true : _c, _d = props.labelsDistanceFromXaxis, labelsDistanceFromXaxis = _d === void 0 ? 0 : _d, horizontal = props.horizontal, secondaryStepHeight = props.secondaryStepHeight, secondaryStepValue = props.secondaryStepValue, secondaryNegativeStepHeight = props.secondaryNegativeStepHeight, secondaryNegativeStepValue = props.secondaryNegativeStepValue, barMarginBottom = props.barMarginBottom, highlightEnabled = props.highlightEnabled, highlightedBarIndex = props.highlightedBarIndex, lowlightOpacity = props.lowlightOpacity, stackHighlightEnabled = props.stackHighlightEnabled, selectedStackIndex = props.selectedStackIndex, setSelectedStackIndex = props.setSelectedStackIndex;
diff --git a/node_modules/react-native-gifted-charts/dist/Components/AnimatedThreeDBar/index.js b/node_modules/react-native-gifted-charts/dist/Components/AnimatedThreeDBar/index.js
index f5ad0e4..af87355 100644
--- a/node_modules/react-native-gifted-charts/dist/Components/AnimatedThreeDBar/index.js
+++ b/node_modules/react-native-gifted-charts/dist/Components/AnimatedThreeDBar/index.js
@@ -21,10 +21,6 @@ import Svg, { Defs, Rect } from 'react-native-svg';
 import { styles } from './styles';
 import LinearGradient from "../common/LinearGradient";
 import { useAnimatedThreeDBar, } from 'gifted-charts-core';
-if (Platform.OS === 'android') {
-    UIManager.setLayoutAnimationEnabledExperimental &&
-        UIManager.setLayoutAnimationEnabledExperimental(true);
-}
 var TriangleCorner = function (props) {
     return (_jsx(View, { style: [
             triangleStyles.triangleCorner,

This issue body was partially generated by patch-package.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions