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

[react-interactions] Refactor TabFocusController #16768

Merged
merged 1 commit into from
Sep 12, 2019

Conversation

trueadm
Copy link
Contributor

@trueadm trueadm commented Sep 12, 2019

After speaking to @gaearon today, he mentioned that we can extract the internal interface of TabFocusController so that it's exposed as an import rather than as an internal interface on the functional component (thus removing the need to use useImperativeMethods hook). This should improve the performance, memory and overall explicitness quite a bit – plus making more sense as a general way of handling tab focus across other scopes.

I made the module ReactTabFocus as this is more like a bucket of methods + component needed for handling browser tab focus.

@sizebot
Copy link

sizebot commented Sep 12, 2019

No significant bundle size changes to report.

Generated by 🚫 dangerJS against 4c4fec2

@necolas
Copy link
Contributor

necolas commented Sep 12, 2019

lgtm, IIRC this is the direction we want to take to replace the RN ref methods too

@trueadm trueadm merged commit 4b0b556 into facebook:master Sep 12, 2019
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.

4 participants