vue-native-core: Maximum call stack size exceeded on Animate
When i use animate component in Developer mode it works fine but In Production mode the error appears. And i removed my all animate:view instead one animate component from my template then it worked. What should i do ? My Template:
...
<animated:view class="scrolledContainer" :style="{backgroundColor:'rgba(247,247,247,'+JSON.stringify(testColor)+')'}">
<view :style="{height:statusBarHeight,width:'100%'}"/>
<animated:view class="headerContainer" :style="{opacity:transparentHeader,height:transparentHeight}">
...
</animated:view>
<animated:view class="scrolledHeader" :style="{opacity:whiteHeader,height:whiteHeight}">
<animated:text class="headerTitleTextStyle" :style="{fontSize:titleFont,opacity:titleColor}">{{data.name}}</animated:text>
</animated:view>
</animated:view>
...
So i reduced like:
...
<animated:view class="scrolledContainer" :style="{backgroundColor:'rgba(247,247,247,'+JSON.stringify(testColor)+')'}">
<view :style="{height:statusBarHeight,width:'100%'}"/>
</animated:view>
...
So i think it has to be only one animate component in a screen, Or i have to write React native component My Defendencies
"dependencies": {
"expo": "29.0.0",
"i18next": "12.1.0",
"native-base": "2.8.1",
"react": "16.5.0",
"react-i18next": "8.3.8",
"react-native": "0.55.4",
"react-navigation": "3.0.4",
"vue-native-core": "0.0.8",
"vue-native-helper": "0.0.9",
"vuelidate": "0.7.4",
"vuex": "3.0.1",
"vuex-persist": "2.0.0"
},
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 3
- Comments: 22 (3 by maintainers)
This issue seems to go away when binding the Animated
_valuedirectly. For example, lets say you have this component:To resolve the “Maximum call stack size exceeded” error, you would change
:style="{opacity: animatedOpacityValue}"to:style="{opacity: animatedOpacityValue._value}":I don’t know if this has any impact on performance.
@emaadali this worked for me, ilu
Hello, I also have this problem.
in my case, i fixed it with
Original code, on production will cause Maximum call stack size exceeded (android and iOS)
the FIX, is to remove
myAnimatedValuefrom Vue instance, as followsin my case, it solved.