Open bd-arc opened 6 years ago
Here are some thoughts on how to make examples easier to use.
Put them in snacks and or update installation instructions
Pair it down or make multiple versions.
the current example seems to do too much. There are two main components and there's lots of case handling in them in order to remain two components. This means that in order to use the example, you should read and comprehend the whole thing. Most users will only have one case, and they want a copy/paste solution, so they can get it working in their app as quickly as possible. so instead of handling so many cases and building an component with a lot of componentry in it, try simplifying as much as possible, and if you want multiple looks and feels, make multiple components.
Make sure the event methods are exposed in the item component. Its probably also good to show how to both keep this component in the same file, and to pass the handlers as props, if youre making multiple examples.
Please add an example of Infinite Scroll. Especially in the case of Tinder, technically it would be an infinite load. Until the resource queue ends.
cheers
@fotoflo Those are valid points. I had similar thoughts and they led to the decision that a complete overhaul of the example app was needed ;-)
@MichelDiz I'll see what I can do about it :-)
Note that I don't have time at the moment to work on it, but it seats at the top of my to-do list.
I'm not skilled enough at this point to provide new examples, but I was having trouble running the existing examples. I ported the code to a new react-native init
project, and got the example working with react-native 0.61.5 here: https://github.com/kylebarron/react-native-snap-carousel-example
I could submit a PR for it if you'd like
Thank you for the offer @kylebarron! I would definitely appreciate it :-)
Sorry, please allow me to advertise for my open source library! ~ I think this library react-native-reanimated-carousel will solve your problem. It is a high performance and very simple component, complete with React-Native reanimated 2
Sorry, please allow me to advertise for my open source library! ~ I think this library react-native-reanimated-carousel will solve your problem. It is a high performance and very simple component, complete with React-Native reanimated 2
but i was deprecated in my project kindly fix that,
Default layout
Default layout with small slides
inactiveSlideShift
'Stack' layout
Tinder layout
Custom interpolations
Others