Skip to content

Commit 0dd942b

Browse files
committed
Update Animation docs for createElement
1 parent eb2827e commit 0dd942b

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

docs/docs/09.1-animation.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,17 +165,21 @@ This is called when the `willLeave` `callback` is called (at the same time as `c
165165
By default `ReactTransitionGroup` renders as a `span`. You can change this behavior by providing a `component` prop. For example, here's how you would render a `<ul>`:
166166

167167
```javascript{1}
168-
<ReactTransitionGroup component={React.DOM.ul}>
168+
<ReactTransitionGroup component="ul">
169169
...
170170
</ReactTransitionGroup>
171171
```
172172

173-
Every DOM component is under `React.DOM`. However, `component` does not need to be a DOM component. It can be any React component you want; even ones you've written yourself!
173+
Every DOM component that React can render is available for use. However, `component` does not need to be a DOM component. It can be any React component you want; even ones you've written yourself!
174+
175+
> Note:
176+
>
177+
> Prior to v0.12, when using DOM components, the `component` prop needed to be a reference to `React.DOM.*`. Since the component is simply passed to `React.createElement`, it must now be a string. Composite components must pass the factory.
174178
175179
Any additional, user-defined, properties will be become properties of the rendered component. For example, here's how you would you render a `<ul>` with css class:
176180

177181
```javascript{1}
178-
<ReactTransitionGroup component={React.DOM.ul} className="animated-list">
182+
<ReactTransitionGroup component="ul" className="animated-list">
179183
...
180184
</ReactTransitionGroup>
181185
```

0 commit comments

Comments
 (0)