# react-transition-hooks

> Like React Transition Group, but better.

Latest version **1.2.0** (published 2018-01-05) · BSD-3-Clause license · 0 weekly downloads

## Install

```sh
npm install react-transition-hooks
pnpm add react-transition-hooks
yarn add react-transition-hooks
bun add react-transition-hooks
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.0 |
| Published | 2018-01-05 |
| First published | 2016-07-13 |
| Weekly downloads | 0 |
| License | BSD-3-Clause |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 6 |
| Author | Felipe Thomé |
| Maintainers | felipethome |
| Keywords | react, react-component, react-animation, react-addons, transition-group |

## Links

- npm: https://www.npmjs.com/package/react-transition-hooks
- Repository: https://github.com/felipethome/react-transition-hooks
- Homepage: http://felipethome.github.io/react-inline-transition-group
- Issues: https://github.com/felipethome/react-transition-hooks/issues
- npm.io page: https://npm.io/package/react-transition-hooks

## Dependencies (2)

- [prop-types](https://npm.io/package/prop-types.md) ^15.5.8
- [create-react-class](https://npm.io/package/create-react-class.md) ^15.5.2

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.2.0 (latest) — 2018-01-05
- 1.1.1 — 2017-05-15
- 1.1.0 — 2017-02-17
- 1.0.10 — 2017-02-17
- 1.0.9 — 2017-02-17
- 1.0.8 — 2017-02-17
- 1.0.7 — 2016-11-27
- 1.0.6 — 2016-11-27
- 1.0.5 — 2016-10-31
- 1.0.4 — 2016-09-06
- 1.0.2 — 2016-07-24
- 1.0.1 — 2016-07-15
- 1.0.0 — 2016-07-13

## README

# React Transition Hooks

The goal of this component is supply a better alternative to [ReactTransitionGroup](https://facebook.github.io/react/docs/animation.html). Why? Because, ReactTransitionGroup animations can not be interrupted. So, if you are with a component entering the group it can not leave until the entering phase is complete. Plus, Facebook will drop support for ReactTransitionGroup soon.

If you have a component currently using ReactTransitionGroup you can just change your import with this component and everything should work as expected.

[Demo using ReactInlineTransitionGroup](http://felipethome.github.io/react-inline-transition-group/demo/index.html)

# How to install

    npm install react-transition-hooks

## Hooks

This component uses the same API names of ReactTransitionGroup. 

- **componentWillAppear(callback)**: Called right after componentDidMount. This is called for the children inside the group for the first render. After the first render this will never be called again.

- **componentDidAppear()**: Called when the callback passed to componentWillAppear is called.

- **componentWillEnter(callback)**: Called when a component just entered the group.

- **componentDidEnter()**: Called when the callback passed to componentWillEnter is called.

- **componentWillLeave(callback)**: Called when a component is leaving the group.

- **componentDidLeave()**: Called when the callback passed to componentWillLeave is called. This is called right after componentWillUnmount.

## Properties

Property name | Description
------------ | -------------
component | The component that will wrap all the children. Default: span

## LICENSE

BSD-3

---
_Source: https://npm.io/package/react-transition-hooks · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
