I am using react native mapbox and have several and dynamic child component(layers) in Map component.
Something like:
<MapboxGL.MapView ...>
<MapboxGL.RasterSource>
...
</MapboxGL.RasterSource>
...
</MapboxGL.MapView>
There so many child component dynamic and conditonal.
I want to remove unwanted component because update some component doest not support.
So any suggestion or idea
You can use state and conditionally render your items depending on the state e.g