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

Fix effect cleanups for react 17 #310

Merged
merged 1 commit into from
Sep 2, 2020
Merged

Fix effect cleanups for react 17 #310

merged 1 commit into from
Sep 2, 2020

Conversation

anajavi
Copy link
Collaborator

@anajavi anajavi commented Sep 2, 2020

what?

In React 17 the effect cleanup functions run asynchronously..

This PR changes the cleanup functions so, that they should work in React 17 too.

why?

React 17 should release this week.

@anajavi anajavi requested a review from whawker September 2, 2020 06:10
@codecov-commenter
Copy link

codecov-commenter commented Sep 2, 2020

Codecov Report

Merging #310 into master will increase coverage by 16.78%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master     #310       +/-   ##
===========================================
+ Coverage   71.48%   88.27%   +16.78%     
===========================================
  Files          18       82       +64     
  Lines         249     1049      +800     
  Branches       45      206      +161     
===========================================
+ Hits          178      926      +748     
- Misses         63      107       +44     
- Partials        8       16        +8     
Impacted Files Coverage Δ
...s/react-jsx-highcharts/src/components/Axis/Axis.js 92.85% <100.00%> (ø)
...x-highcharts/src/components/BaseChart/BaseChart.js 97.77% <100.00%> (ø)
...x-highcharts/src/components/ColorAxis/ColorAxis.js 100.00% <100.00%> (ø)
...act-jsx-highcharts/src/components/Series/Series.js 97.10% <100.00%> (ø)
...highcharts/src/components/PlotBandLine/PlotBand.js 100.00% <0.00%> (ø)
packages/react-jsx-highcharts/src/index.js 100.00% <0.00%> (ø)
...arts/src/components/Series/createProvidedSeries.js 100.00% <0.00%> (ø)
...s/src/components/PlotBandLine/PlotBandLineLabel.js 100.00% <0.00%> (ø)
...x-highcharts/src/components/SeriesContext/index.js 100.00% <0.00%> (ø)
... and 58 more

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 20ac729...a17db20. Read the comment docs.

Copy link
Owner

@whawker whawker left a comment

Choose a reason for hiding this comment

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

Great spot on these.

@anajavi
Copy link
Collaborator Author

anajavi commented Sep 2, 2020

Great spot on these.

We might have to make unmounting tests async too, but let's see when enzyme lands react 17 support.

@anajavi anajavi merged commit 357cbee into master Sep 2, 2020
@anajavi anajavi deleted the fix/react-17-unmount branch September 2, 2020 07:32
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.

3 participants