This component wraps a MapLibre Source object. He manages its life cycle and is
responsible for adding/removing it to the map. For this reason this component
must be a descendant of RMap.
The id and the type props are readonly. This allows us to manage
reactivity on the same instance throughout its lifecycle. In some cases you'll have
to add a key prop to maintain this state. see below Error: RSource id should not change.
Some props are reactive, it depends on the source type
Error: RSource id should not change.
When you have conditional renderers within your RMap component you will need to set the
prop key for your RSource to help React maintain its association with the correct component.
Consider id prop for MapLibre mapping and key prop for React mapping. If you want to know
why see Tips: key vs id.
Reference
Check the MapLibre Sources reference page for details.