[v4] animatedIndex passed to backgroundComponent is always -1
See original GitHub issueBug
I’m trying to use the exact example you provide for backgroundComponent
and it is not animating. If I do a console.log
on animatedIndex.value
it always returns -1
.
Environment info
Library | Version |
---|---|
@gorhom/bottom-sheet | 4.0.3 |
react-native | 0.64.1 |
react-native-reanimated | 2.2.0 |
react-native-gesture-handler | 1.10.3 |
Steps To Reproduce
- I copy/pasted the full example from the examples folder into my app and tried it and got the described result above.
Describe what you expected to happen:
- It should animate between colors and it is not.
Reproducible sample code
https://snack.expo.dev/@codylundquist/bottomsheet-v4-reproducible-for-647
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
[v4] animatedIndex passed to backgroundComponent is ...
I'm trying to use the exact example you provide for backgroundComponent and it is not animating. If I do a console.log on animatedIndex.value...
Read more >Custom Background | React Native Bottom Sheet
Custom Background. To override the default background, you will need to pass the prop backgroundComponent to the BottomSheet component.
Read more >[v4] animatedIndex passed to backgroundComponent is always
Bug I'm trying to use the exact example you provide for backgroundComponent and it is not animating.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Playing around with the snack more and trying the custom backdrop example, it seems to be working. The error I pointed out seems to be an Expo Go issue. Reloading the app when it happens fixes it. I’m still pretty confused how this animation stuff works. It would be great if there was some documentation around explaining it more. Thanks!
Do you have some documentation around this?
Also, I updated the snack to what you suggested and it crashed the app with an error of “Uncaught Error: Animated node with ID 2 already exists.” I’ve updated the snack so you can see for yourself.