Closed Engazan closed 2 years ago
btw fake FIX, until they fix it
InteractionManager.runAfterInteractions(() => {
setTimeout(() => {
if (props.visible) {
contentHeight.value = props.snapPoints[0]
currentSnapIndex.value = 0
} else {
contentHeight.value = 0
currentSnapIndex.value = -1
}
}, 300) // fakeit
})
I have the feeling this could be related to this issue: https://github.com/software-mansion/react-native-reanimated/issues/2571 . Is that the case? (reproduction might be simpler there)
@hannojg right your case looks similar
@hannojg right your case looks similar
Btw idk if its same as my originál post but also another problem when changing state in modal passed true props it looks like shared values get wiped ( this is why height is 0 until i click outside to somehow enable refreshing this values ), even there is no listener to this state change
Btw even when changing redux state also trigger this bug
Small preview example from my test app
@piaskowyk tried your fix "operations-order", but without success, somehow when component rerender animated values get overwritten until force refresh ( adding something to code )
"react-native-reanimated": "github:software-mansion/react-native-reanimated#@piaskowyk/operations-order"
workaround ( fakeit ) is setting React.memo to right places but its terrible fixing it this way
@piaskowyk
update this pull will fix it for me ( tested on multiple apps )
"react-native-reanimated": "github:software-mansion/react-native-reanimated#@piaskowyk/initial-style-shared",
https://github.com/software-mansion/react-native-reanimated/pull/2851
Description
Sometimes my Animated content is not reacting to Height changes ( only in v2.3+, works fine in v2.2 )
first i thought its Modal plugin proble so i made my own simple Modal Component to try it with expo and without expo ( ejected ) and it looks like its new Reanimated problem ( working on expo 43 with reanimated 2.2 )
Expected behavior
when i set sharedValue i expect to reflect it on height
Actual behavior & steps to reproduce
Preview:
https://user-images.githubusercontent.com/53254371/149488127-2bdae745-7b0c-4476-8c6a-bcf958da4253.mp4
Snack or minimal code example
Package versions
Affected platforms