- {ref => {/* Your content goes here*/}
}
-
- >
- )
-}
-```
-
-Be sure to attach the `ref` or your transitions will not work correctly.
-
### Animating transitions
By default, a `Transition` will enter and leave instantly, which is probably not what you're looking for if you're using this library.
@@ -317,7 +292,7 @@ function MyComponent({ isShowing }) {
| `show` | Boolean | Whether the children should be shown or hidden. |
| `as` | String Component _(Default: `'div'`)_ | The element or component to render in place of the `Transition` itself. |
| `appear` | Boolean _(Default: `false`)_ | Whether the transition should run on initial mount. |
-| `unmount` | Boolean _(Default: `true`)_ | Whether the element should be unmounted or hidden based on the show state. |
+| `unmount` | Boolean _(Default: `true`)_ | Whether the element should be `unmounted` or `hidden` based on the show state. |
| `enter` | String _(Default: '')_ | Classes to add to the transitioning element during the entire enter phase. |
| `enterFrom` | String _(Default: '')_ | Classes to add to the transitioning element before the enter phase starts. |
| `enterTo` | String _(Default: '')_ | Classes to add to the transitioning element immediately after the enter phase starts. |
@@ -331,9 +306,7 @@ function MyComponent({ isShowing }) {
##### Render prop arguments
-| Prop | Type | Description |
-| ----- | ---------------------- | ----------------------------------------------------------------------------------- |
-| `ref` | React.MutableRefObject | A ref that needs to be manually added to the child node when using the render prop. |
+- None
#### Transition.Child
@@ -359,7 +332,7 @@ function MyComponent({ isShowing }) {
| ----------- | ------------------------------------- | ------------------------------------------------------------------------------------- |
| `as` | String Component _(Default: `'div'`)_ | The element or component to render in place of the `Transition.Child` itself. |
| `appear` | Boolean _(Default: `false`)_ | Whether the transition should run on initial mount. |
-| `unmount` | Boolean _(Default: `true`)_ | Whether the element should be unmounted or hidden based on the show state. |
+| `unmount` | Boolean _(Default: `true`)_ | Whether the element should be `unmounted` or `hidden` based on the show state. |
| `enter` | String _(Default: '')_ | Classes to add to the transitioning element during the entire enter phase. |
| `enterFrom` | String _(Default: '')_ | Classes to add to the transitioning element before the enter phase starts. |
| `enterTo` | String _(Default: '')_ | Classes to add to the transitioning element immediately after the enter phase starts. |
@@ -369,9 +342,7 @@ function MyComponent({ isShowing }) {
##### Render prop arguments
-| Prop | Type | Description |
-| ----- | ---------------------- | ----------------------------------------------------------------------------------- |
-| `ref` | React.MutableRefObject | A ref that needs to be manually added to the child node when using the render prop. |
+- None
---