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

[HEAP-9449] Perform ref forwarding for react nav HOC #101

Merged
merged 2 commits into from
Jun 12, 2019

Conversation

jmtaber129
Copy link
Contributor

@jmtaber129 jmtaber129 commented Jun 7, 2019

This is needed for users using the Navigating without navigation prop pattern.

The changes made in this PR generally follow the instructions in the Forwarding refs to HOCs documentation, although there's some additional logic caused by the HOC needing the inner ref, as well (setRef copied from here).

TODO: Add tests that would fail if the ref isn't forwarded. Done

Copy link
Contributor

@GrandPoohBear GrandPoohBear left a comment

Choose a reason for hiding this comment

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

LGTM! Nice work.

That's a FUNKY pattern - hadn't run across that before!

@jmtaber129 jmtaber129 marked this pull request as ready for review June 10, 2019 22:19
Copy link
Contributor

@GrandPoohBear GrandPoohBear left a comment

Choose a reason for hiding this comment

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

LGTM

@jmtaber129 jmtaber129 merged commit a3b712e into develop Jun 12, 2019
@jmtaber129 jmtaber129 deleted the jmtaber129/nav-hoc-ref-forwarding branch June 12, 2019 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants