You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 in reactSubviews which on iOS ends up being the parent view if you pass something like:
ourdudekyle
changed the title
[Bug]: PointAnnotation Throwing an Error with Nested Children
[Bug]: PointAnnotation Throwing an Error with Nested Children on RN 0.76 with New Architecture
Nov 6, 2024
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: