-
-
Notifications
You must be signed in to change notification settings - Fork 852
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
[Bug]: PointAnnotation Throwing an Error with Nested Children on RN 0.76 with New Architecture #3682
Comments
I have the same problem |
<PointAnnotation
|
Hello, we have the same issue! |
@thomasgrivet you can add collapsable={false} to a component to disable flattening. |
@matiastang, good callout, it looks like there were changes around this prop in RN-0.76. |
Confirmed, setting |
I think it's still a valid issue we either need to fix this or at least document it. |
@mfazekas, yeah documenting it would be a good idea, since the issue is stemming from a change in how RN handles optimizing the view hierarchy in 0.76. I can try to get a PR up for this later |
Mapbox Implementation
Mapbox
Mapbox Version
default
React Native Version
0.76
Platform
iOS, Android
@rnmapbox/maps
version10.1.33
Standalone component to reproduce
Observed behavior and steps to reproduce
With RN 0.76 and the New Architecture, PointAnnotations with nested children (like a View with a Text component inside it) through an error of:
Mapbox [error] PointAnnotation supports max 1 subview other than a callout
,and don't render completely. On iOS, this results in the View being rendered, but not the Text inside the view. This can be seen in the
Point Annotation Anchors
example:Expected behavior
PointAnnotations structured like this would load the View and the Text component inside it.
Notes / preliminary analysis
The parent view and its children are getting flattened, and
_createViewSnapshot
is being called with with the first subview inreactSubviews
which on iOS ends up being the parent view if you pass something like:to PointAnnotation
Additional links and references
No response
The text was updated successfully, but these errors were encountered: