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

CB-4275 feat: app height set via js #2259

Merged
merged 3 commits into from
Dec 29, 2023

Conversation

sergeyteleshev
Copy link
Contributor

No description provided.

@sergeyteleshev sergeyteleshev self-assigned this Dec 27, 2023
Copy link
Member

@Wroud Wroud left a comment

Choose a reason for hiding this comment

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

Please move this logic to separate hook and some tips:

  1. Will be better to use ResizeObserver?
  2. You can use useLayoutEffect without deps (not empty), root component won't be rerendered a lot and we don't want side effects related to react or browser behavior.
  3. Set default value for css variable to 100vh

@sergeyteleshev
Copy link
Contributor Author

  1. Will be better to use ResizeObserver?

During the test it appeared that resize observer only tracks element width, which is really weird. so I decided to go with window.addEventListener() due to the fact it works just fine

@sergeyteleshev sergeyteleshev merged commit 0f1cac9 into devel Dec 29, 2023
4 checks passed
@sergeyteleshev sergeyteleshev deleted the CB-4275-inconsistent-mobile-rendering branch December 29, 2023 11:47
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.

4 participants