Skip to content

Conversation

glittershark
Copy link
Contributor

I've been encountering an issue where on initial page load the event
handler for page:change was getting fired twice, causing the React
components to be mounted twice, which caused all sorts of trouble. This
introduces a simple map of DOM nodes to booleans that acts as a guard
against nodes getting components mounted to them more than once.

I've been encountering an issue where on initial page load the event
handler for `page:change` was getting fired twice, causing the React
components to be mounted twice, which caused all sorts of trouble. This
introduces a simple map of DOM nodes to booleans that acts as a guard
against nodes getting components mounted to them more than once.
@sophiebits
Copy link
Member

React.renderComponent should be idempotent though…

@glittershark
Copy link
Contributor Author

So is the issue here actually that trying to render an identical component to a node twice isn't working properly for this version of React?

@sophiebits
Copy link
Member

I don't know what the issue is but the fix proposed here sounds off to me.

@jtmalinowski
Copy link
Collaborator

@glittershark how about we start with a repro case?

@meleyal
Copy link
Contributor

meleyal commented Aug 25, 2014

I think this is the same issue as #69

@zpao
Copy link
Member

zpao commented Sep 7, 2014

Just merged #69. Can you see if this is still occurring for you @glittershark?

@glittershark
Copy link
Contributor Author

@zpao that does it!

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.

5 participants