chenglou / chenglou/react-motion
How do I animate transition of nested components?
- Dominant language
- JavaScript
- Stars
- 21.9k
- Forks
- 1.1k
- PR merge metrics
- No merged PRs in 30d
Description
Consider the following code:
```
class Feed extends Component {
render() {
this.props.posts.map((post, i) => )
}
}
```
This is a feed of posts. Posts can be deleted. When a post is deleted, I'd like for it to become transparent and collapse (e.g. animate to `{opacity: 0, height: 0px}`). How can I do this?
It seems that `` should be able to help here, but it seems to depend on carrying around the content of the nested element. I can't do that here, because the content of the nested elements is determined by their components.
What's the proper solution for animating transition of nested components?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the TransitionMotion API and the nested Post component pattern shown in the issue. Determine whether the existing API supports animating removed nested components without carrying their content, and identify the relevant examples or documentation entry points. Done means a decided, documented approach or a clearly scoped implementation path for this use case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100