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

BREAKING(Portal): use createRef() API internally #3454

Merged
merged 1 commit into from
Feb 22, 2019

Conversation

layershifter
Copy link
Member

@layershifter layershifter commented Feb 22, 2019

This PR continues adoption of createRef().


BREAKING CHANGES

Will affect you only if you used the PortalInner component directly before.

PortalInner returned node previously in onMount/onUnmount callbacks. Now you should use innerRef.

Before

<PortalInner onMount={(e, data) => console.log(data.node)} />

After

const innerRef = React.createRef()

<PortalInner innerRef={innerRef} />
console.log(innerRef.current)

@codecov-io
Copy link

Codecov Report

Merging #3454 into master will decrease coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3454      +/-   ##
==========================================
- Coverage   99.89%   99.89%   -0.01%     
==========================================
  Files         172      172              
  Lines        2827     2825       -2     
==========================================
- Hits         2824     2822       -2     
  Misses          3        3
Impacted Files Coverage Δ
src/addons/Portal/Portal.js 100% <100%> (ø) ⬆️
src/addons/Portal/PortalInner.js 100% <100%> (ø) ⬆️

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 ac9dc92...3491580. Read the comment docs.

@layershifter layershifter merged commit 3ff3563 into master Feb 22, 2019
@layershifter layershifter deleted the chore/portal-ref branch February 22, 2019 17:56
@levithomason
Copy link
Member

Released in [email protected].

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants