Skip to content

Commit

Permalink
Merge pull request #22 from devrnt/chore/use-babel-config
Browse files Browse the repository at this point in the history
chore: add babel config
  • Loading branch information
devrnt committed Jan 12, 2021
2 parents 0c8ad2f + e5d7385 commit 0b3a8b8
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"presets": [
[
"@babel/preset-env",
{
"targets": "defaults, not IE 11"
}
]
]
}
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
- Focused on logic
- Zero dependencies
- No UI restrictions
- [Tiny size](https://bundlephobia.com/result?p=react-use-wizard@latest)
- Written in TypeScript

## Installation
Expand Down Expand Up @@ -63,6 +64,7 @@ const Step1 = () => {
- [Examples](#examples)
- [Async](#async)
- [Animation](#animation)
- [IE11](#ie11)

## API

Expand Down Expand Up @@ -227,3 +229,8 @@ If an async function is attached to `handleStep` the `isLoading` property will i
Since `react-use-wizard` is focused to manage the logic of a wizard it doesn't mean you can't add some animation by your own. Add any animation library that you like. I highly suggest [framer-motion](https://www.framer.com/motion/) to add your animations.

Checkout this [example](https://github.com/devrnt/react-use-wizard/blob/main/playground/components/animatedStep.tsx) to see how a step can be animated with framer motion.

## IE11
Since Internet Explorer 11 doesn't support promises or async functions you'll need to install a polyfill for the `regenerator-runtime`.

In general using [react-app-polyfill](https://www.npmjs.com/package/react-app-polyfill) is recommended, it includes polyfills for various browsers.

0 comments on commit 0b3a8b8

Please sign in to comment.