Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not reload the disqus component unless the identifier changes #19

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

brucethwaits
Copy link

Do not reload the disqus component on componentDidUpdate() unless the identifier changes.
Without this change, any change in page store data can trigger a reload of the disqus component.

This change works on my machine when using the script as part of another solution. However, when I try build as part of the forked repo, I get this error on npm install :
No compatible version found: react@'>=0.14.0 <0.15.0'

… identifier changes.

Without this change, any change in page store data can trigger a reload of the disqus component.
@brucethwaits
Copy link
Author

The change works - I just wasn't able to run your dist build to create the dist files (including minified js)

@thangngoc89
Copy link

I think this logic should be in shouldComponentUpdate

This way, no need for state. Just compare current props and nextProps

@mzabriskie
Copy link
Owner

Agreed with @thangngoc89, let's move the logic to shouldComponentUpdate.

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.

None yet

3 participants