```ts
function withTransition<P>(
   Component, 
   timeout, 
   stateAfterTransition): (props) => Element | null;
```

## Type Parameters

| Type Parameter |
| ------ |
| `P extends object` |

## Parameters

| Parameter | Type | Default value |
| ------ | ------ | ------ |
| `Component` | `ComponentType<P>` | `undefined` |
| `timeout` | `number` | `undefined` |
| `stateAfterTransition` | `"hide" \| "unmount"` | `'unmount'` |

## Returns

```ts
(props): Element | null;
```

### Parameters

| Parameter | Type |
| ------ | ------ |
| `props` | `P` & [`WithTransitionProps`](../interfaces/WithTransitionProps.mdx) |

### Returns

```ts
Element | null
```
