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

feat(ssr): remove listener only if we added them #537

Merged
merged 3 commits into from Nov 17, 2017

Conversation

DomiR
Copy link
Contributor

@DomiR DomiR commented Nov 17, 2017

What kind of change does this PR introduce?

  • bugfix
  • feature
  • refactoring / style
  • build / chore
  • documentation

Did you add tests for your changes?

  • Yes, my code is well tested
  • Not relevant

If relevant, did you update the documentation?

  • Yes, I've updated the documentation
  • Not relevant

Summary

I have a tree-walker running for SSR and although componentWillMount and componentWillUnmount will be called on server, componentDidMount will not. Therefore we can't remove eventListener for the null ref.

Does this PR introduce a breaking change?
No

@okonet
Copy link
Collaborator

okonet commented Nov 17, 2017

Thanks for working on this! Let's start with fixing the failing CI, please.

@codecov
Copy link

codecov bot commented Nov 17, 2017

Codecov Report

Merging #537 into master will increase coverage by 0.03%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #537      +/-   ##
==========================================
+ Coverage   96.95%   96.98%   +0.03%     
==========================================
  Files           3        3              
  Lines         197      199       +2     
  Branches       51       53       +2     
==========================================
+ Hits          191      193       +2     
  Misses          6        6
Impacted Files Coverage Δ
src/index.js 97.1% <100%> (+0.03%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 67ffd7c...8b2921b. Read the comment docs.

@okonet okonet merged commit ccb859f into react-dropzone:master Nov 17, 2017
josephfrazier added a commit to josephfrazier/react-dropzone that referenced this pull request Jul 14, 2018
This change fixes potential issues with SSR, similarly to react-dropzone#537
okonet pushed a commit that referenced this pull request Aug 18, 2018
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

2 participants