Dub Step Versions Save

🕺🏽 Step through an index with style: Primitives for building step/index based UI widgets controlled by swipe, timers, and/or buttons in React.

v0.0.7

6 years ago

Thanks @connor-baer for submitting #12.

This release also includes an improved README thanks to emdaer. Check it out if you haven't tried it.

v0.0.6

6 years ago

Somewhere in the course of refactoring things, componentWillUnmount got removed 🙃 . That is fixed now.

Thx @lkbr for submitting infiniteluke/dub-step/issues/9.

v0.0.5

6 years ago

Naming is Hard

3 of the hardest CS probelms:

  1. Naming things
  2. Off by one errors

I've decided to make a ⚠️ breaking change⚠️ and rename index to step. This fits with the name of the package better and is more descriptive of it's role. This is a minor change but will break your current code if you rely on index, which you probably do.. See the docs for details.

Components

@kentcdodds' tweet and the attached poll got me thinking that dub-step should provide components powered by the existing prop getters as folks will probably find them easier to use. Prop getters are more powerful and will continue to be supported, but the provided components Next, Previous, Play, Pause, and StepIndex will be the recommended approach for using dub-step from now on.

To be clear, both of these options work and the main difference is preference:

...
<button {...getNextControlProps()}>Next</button>
...

and

...
<Next>Next</Next>
...

Next and getNextControlProps and the like are both provided in dub-steps child function.

See the README and the docs for more info!

Also check out detailed examples on Codesandbox!

Edit dub-step Examples 🕺🏽

v0.0.3

6 years ago

🕺🏽 Step through an index with style: Primitives for building index based UI widgets controlled by swipe, timers, and/or buttons.

v0.0.4

6 years ago

Use this.next() and this.previous() in swipeEnd so that onNext & onPrevious prop callbacks get called.