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

Invalid prop useScrolllView when using custom component #705

Open
5 tasks done
moritzw1 opened this issue Jun 2, 2020 · 2 comments
Open
5 tasks done

Invalid prop useScrolllView when using custom component #705

moritzw1 opened this issue Jun 2, 2020 · 2 comments

Comments

@moritzw1
Copy link

moritzw1 commented Jun 2, 2020

Is this a bug report, a feature request, or a question?

Bug report

Have you followed the required steps before opening a bug report?

(Check the step you've followed - put an x character between the square brackets ([]).)

Have you made sure that it wasn't a React Native bug?

Yes

Is the bug specific to iOS or Android? Or can it be reproduced on both platforms?

Happens on both platforms

Is the bug reproductible in a production environment (not a debug one)?

Yes

Environment

Environment:
React: 16.9.0
React native: 0.62.2
react-native-snap-carousel: 3.9.1

Target Platform:
Android (10)
iOS (13.5)

Expected Behavior

Should use the provided ScrollView/FlatList component

Actual Behavior

Warning: Failed prop type: Invalid prop useScrollView supplied to Carousel.

Reproducible Demo

(Paste the link to a Snack example in which the issue can be reproduced. Please follow the guidelines for providing a Minimal, Complete, and Verifiable example.)

Steps to Reproduce

(Write your steps so that anyone can reproduce the issue in the Snack demo you provided.)

  1. Create a Carousel component as usual
  2. Import ScrollView from react-native-gesture-handler
  3. Create Animatable Component
    const AnimatedScrollView = Animated.createAnimatedComponent(ScrollView);
  4. Pass the AnimatedScrollView component to useScrollView prop as described in the docs
    <Carousel useScrollView={AnimatedScrollView}
  5. The warning occurs and the Carousel won't use the custom component

Since version 3.7.6, this prop also accepts a custom scroll component (see #498 for more info).

@meiqi1992
Copy link

+1

nedeljko0 added a commit to nedeljko0/react-native-snap-carousel that referenced this issue Sep 2, 2020
@dohooo

This comment was marked as spam.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants