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

Functional BottomPopup + rendering optimizations #4556

Merged
merged 8 commits into from
Dec 13, 2019

Conversation

southerneer
Copy link
Contributor

@southerneer southerneer commented Dec 12, 2019

Trying to turn BottomPopupNew into a functional component. I was 90% of the way there and then ran into this problem: facebook/react#14042. Listeners added in useEffect (with no dependencies) can't access current values of state or props. So I need to use useReducer instead for the state/props that will be used in that listener to determine when we need to run Actions.refresh({preview: true/false}).

Probably there are some further simplifications I can throw in to make this a lot easier to digest, but I just wanted to get it working first.

@aksonov
Copy link
Contributor

aksonov commented Dec 12, 2019

Why do we need it? Is it really necessary for release (could solve android performance issues)?

@southerneer
Copy link
Contributor Author

Yes, I'm hoping to solve Android performance issues. Also, I'll add a fix for #4560

@southerneer southerneer force-pushed the functional-bottom-sheet branch from da3d78e to fecef1e Compare December 13, 2019 00:05
@southerneer southerneer marked this pull request as ready for review December 13, 2019 00:05
@southerneer southerneer changed the title WIP: Functional BottomPopup + rendering optimizations Functional BottomPopup + rendering optimizations Dec 13, 2019
@bengtan
Copy link
Contributor

bengtan commented Dec 13, 2019

I'm not qualified to review this :)

@aksonov
Copy link
Contributor

aksonov commented Dec 13, 2019

LGTM

@aksonov aksonov merged commit 977c728 into master Dec 13, 2019
@aksonov aksonov deleted the functional-bottom-sheet branch December 13, 2019 08:11
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