Skip to content

Conversation

@petehunt
Copy link
Contributor

No description provided.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is terrible. can someone please help me explain it better?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Honestly, this is very confusing so I'd try not documenting it for now. If people ask questions that this will solve then we can try to explain it better then. Until then, I think having it listed here will confuse more people than it'll help.

@plievone
Copy link
Contributor

Excuse my ignorance, but where is componentDidMount used, I only see componentWillReceiveProps and componentDidUpdate in ReactTransitionGroup? Those test cases seem to imply componentWillEnter and componentDidEnter are not called until second render?

@petehunt
Copy link
Contributor Author

They are not called on the initial render of the transition group, only when they are added to an already mounted transition group

@petehunt
Copy link
Contributor Author

...which should probably be documented

@chenglou
Copy link
Contributor

@plievone yeah that's right. I think the rationale is that animations are not desired during the first render, as you might want to directly display all the items. This way is more flexible as you can just manually call whatever animation api if you want on mount.

@plievone
Copy link
Contributor

Ok I see -- I just mixed up the lifecycle methods in group vs child when skimming the code. This will be very handy!

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe:

This is called after the callback function that was passed to componentWillEnter is called.

@sophiebits
Copy link
Collaborator

Can you update the transitions example too?

@sophiebits sophiebits added this to the 0.9 milestone Feb 14, 2014
zpao added a commit that referenced this pull request Feb 16, 2014
@zpao
Copy link
Member

zpao commented Feb 16, 2014

I stole the code change because I wanted to try to get a final build together. I'll let you wrap up docs :)

@zpao
Copy link
Member

zpao commented Feb 19, 2014

Ping? I'm going to cut tomorrow at some point and would like to not have to double land docs.

petehunt added a commit that referenced this pull request Feb 19, 2014
Document ReactCSSTransitionGroup
@petehunt petehunt merged commit b7836c4 into facebook:master Feb 19, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants