Skip to content

Conversation

@lguzzon
Copy link

@lguzzon lguzzon commented May 30, 2013

I think that "resource management" is important; so once You instantiate a resource in a Component then You have to dispose it at the Component life-time's end (in this case using "componentWillUnmount" method).
That's it.

I think that "resource management" is important; so once You instantiate a resource in a Component then You have to dispose it at the Component life-time's end (in this case using "componentUnMount" method).
That's it.
@zpao
Copy link
Member

zpao commented May 30, 2013

Also, please don't remove the brackets on the code fences. This is what allows us to do line highlighting and call out specific changes in the tutorial.

@lguzzon
Copy link
Author

lguzzon commented May 30, 2013

@benjamn You are rigth ... a got a Typo error ... now fixing
@zpao I see that the rendered markdown with brackets is not highlighted isn't it?

@zpao
Copy link
Member

zpao commented May 30, 2013

On GitHub it won't be - we customized markdown processing a little bit to enable it on the website. That customization actually breaks the highlighting on Github since it's a custom extension. See it in action: http://facebook.github.io/react/docs/tutorial.html

Copy link
Contributor

Choose a reason for hiding this comment

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

React's lifecycle will guarantee that componentWillMount() is called before componentWillUnmount(), so you don't need to do this check :D See http://facebook.github.io/react/docs/advanced-components.html

@petehunt
Copy link
Contributor

@jordow I have a mixin that does this for IG that I want to get into react_contrib.

This is probably a good idea for us to do, however if we use React.autoBind() on the function passed to setInterval() it'll suppress the errors when the component unmounts. I'm pretty sure that killing the setInterval() is better though.

I'm inclined to take this (once rebased) if everyone's OK with it.

@zpao
Copy link
Member

zpao commented Oct 9, 2013

We've redone a lot of the docs (and a lot of React) since this was opened so I'm going to just close it out.

@zpao zpao closed this Oct 9, 2013
jgebhardt added a commit to jgebhardt/react that referenced this pull request Mar 14, 2014
zpao pushed a commit that referenced this pull request Mar 15, 2014
zpao added a commit that referenced this pull request Mar 15, 2014
jgebhardt added a commit to jgebhardt/react that referenced this pull request Jun 30, 2014
sophiebits added a commit that referenced this pull request Jun 30, 2014
fix link in community roundup #18
sophiebits pushed a commit that referenced this pull request Jun 30, 2014
(cherry picked from commit a8e273f)
lunaruan pushed a commit to bvaughn/react that referenced this pull request Jun 15, 2021
…cebook#18)

* add cross-env to set NODE_ENV on windows and fix build on windows

* Update package-lock.json

* Update api.server.js

* Update package.json

Co-authored-by: Ahsan Sohail (213979) <AhSohail@KHI-ICX-AHSANS>
Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants