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 article progress example on android #5189

Merged
merged 5 commits into from
Oct 10, 2023
Merged

Conversation

Latropos
Copy link
Contributor

@Latropos Latropos commented Oct 5, 2023

Summary

An error is thrown when you measure en element that is not mounted yet. So I create a boolean flag which I set when component is ready to avoid this error.

Probably we also should improve error log.

Current error log:

[Reanimated] The view with tag ${viewTag} returned an invalid measurement response.

New error log:

[Reanimated] The view with tag ${viewTag} returned an invalid measurement response. Please make sure the view is currently rendered.

Both logs are not perfect, since in our example our measured element is a Text component, not a View one, however adding component type to log is not easy.

Test plan

@Latropos Latropos marked this pull request as ready for review October 5, 2023 14:46
@piaskowyk piaskowyk self-requested a review October 7, 2023 08:30
app/src/examples/ArticleProgressExample.tsx Outdated Show resolved Hide resolved
src/reanimated2/NativeMethods.ts Show resolved Hide resolved
Latropos and others added 3 commits October 10, 2023 12:12
Co-authored-by: Krzysztof Piaskowy <krzysztof.piaskowy@swmansion.com>
@Latropos Latropos added this pull request to the merge queue Oct 10, 2023
Merged via the queue into main with commit f4592bf Oct 10, 2023
7 checks passed
@Latropos Latropos deleted the acynk/article-progress-example branch October 10, 2023 13:33
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.

None yet

3 participants