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: Fix flow issues with ref #551

Merged
merged 1 commit into from
Oct 4, 2018
Merged

Conversation

gawrysiak
Copy link
Collaborator

Partial fix for #451. Handles the Cannot assign c to this._root flow errors in recent versions of RN and flow.

Since c is a maybe type, it's not compatible with the _root type. React calls the ref callback with null when the component unmounts, that's why it's typed as being possibly null. The PR adds some extra checks to suppress that.

@callstack-bot
Copy link

Hey @gawrysiak, thank you for your pull request 🤗. The documentation from this branch can be viewed here.

@ferrannp ferrannp merged commit 526b8c1 into callstack:master Oct 4, 2018
@gawrysiak gawrysiak deleted the fix/ref-flow branch October 4, 2018 10:20
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