react-native-snap-carousel icon indicating copy to clipboard operation
react-native-snap-carousel copied to clipboard

Updated readme with functional example

Open SirKadogan opened this issue 4 years ago • 4 comments

Platforms affected

  • All platforms

What does this PR do?

  • Adds a functional component example to readme

What testing has been done on this change?

  • It is a working example of a functional component. Just a change to readme.

Tested features checklist

SirKadogan avatar Jan 08 '21 14:01 SirKadogan

Hi! I'm not a maintainer but I also find this to be very useful in the docs, specially to newcomers.

If I may, I'd like to suggest reducing the functional component example to the bare minimum necessary to produce a working example. I'd remove the styles and the set of test elements and present an example perfectly analog to the Class Based example.

And I also think this should be the first example listed in the docs, as it should be the most common use case by now.

Hope I'm not being annoying, this is a good addition to the docs, cheers!

eduardopelitti avatar Feb 04 '21 19:02 eduardopelitti

Thank you @SirKadogan, this is a nice addition!

Three observations though:

  1. Please limit the PR to the new code. Currently there are plenty of minor updates in the file changes that are irrelevant to the PR and that I don't feel like merging (quote marks and line breaks in particular).
  2. Your branch has conflicts and needs to be rebased.
  3. @eduardopelitti's comments are spot on! Mind taking them into account?

Thanks a lot 🙏

bd-arc avatar Feb 11 '21 14:02 bd-arc

@bd-arc sure, I'll make the changes when I have the time.

Although I agree with @eduardopelitti that a cleaner example is better, if I remember correctly the default example was all misaligned when I first tested it and was a bit confusing to understand visually. Some styling seems to help, as a new dev can actually visualize squares moving side to side

SirKadogan avatar Feb 11 '21 14:02 SirKadogan

Is this still an improvement to the lib? lol it's been 3 years.

If it is I can find time to do it this week

SirKadogan avatar Dec 03 '23 18:12 SirKadogan