Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Null is not an object (evaluating "containerRef.current.setNativeProps") #595

Closed
dochonglo opened this issue Aug 20, 2021 · 3 comments
Closed
Labels
bug Something isn't working no-issue-activity v2 Written in Reanimated v1

Comments

@dochonglo
Copy link

dochonglo commented Aug 20, 2021

Bug

I'm rendering a FlatList of items where each has a button that triggers the bottom sheet to come up to display. After presenting itself, the backDropComponent becomes active.

However, when I scroll through the items in the FlatList, I get an error indicating null is not an object (evaluating "containerRef.current.setNativeProps).

This is the error below. After tracing it, it seems to be coming from the BottomSheetBackDrop.tsx file.

IMG_6151

For some context, I just upgraded from bare workflow Expo project from SDK v40 to v41. Interestingly, I wasn't having this issue when using SDK v40. After upgrading to v41, I downgraded the react-native-reanimated and react-native gesture-handler to versions 1.13.2 and 1.8.0, respectively.

Environment info

Library Version
@gorhom/bottom-sheet ^2
react-native 0.64.2
react-native-reanimated ^1.13.2
react-native-gesture-handler 1.8.0

Steps To Reproduce

Below is how I had completed the installation instructions for the @gorhom/react-native-bottom-sheet library.

  1. npm install --save @gorhom/bottom-sheet@^2
  2. npm install --save react-native-reanimated@^1 react-native-gesture-handler
  3. cd ios && pod install

Describe what you expected to happen:

  1. I expected to scroll through the FlatList without the error showing, just like how it was previously working in Expo SDK 40.

Reproducible sample code

Below is the code for how I'm implementing the bottom sheet:

       <BottomSheet
          ref={this.sheetRef}
          index={-1}
          snapPoints={this.state.snapPoints}
          onChange={this.handleSheetChange}
          enableTouchThrough={false}
          backdropComponent={(backdropProps) => (
            <BottomSheetBackdrop
              {...backdropProps}
              enableTouchThrough={false}
            />
          )}
        >
          <BottomSheetScrollView
            contentContainerStyle={styles.contentContainer}
            showsVerticalScrollIndicator={false}
          >
          </BottomSheetScrollView>
        </BottomSheet>
@dochonglo dochonglo added the bug Something isn't working label Aug 20, 2021
@gorhom gorhom added the v2 Written in Reanimated v1 label Aug 21, 2021
@podotki
Copy link

podotki commented Aug 30, 2021

Hello,

I encounter this issue too. Any news ?

Thanks a lot buddy

@github-actions
Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@gorhom
Copy link
Owner

gorhom commented Oct 3, 2021

this should be fixed with v2.4.1

@gorhom gorhom closed this as completed Oct 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working no-issue-activity v2 Written in Reanimated v1
Projects
None yet
Development

No branches or pull requests

3 participants