TrackingContextProvider

Wraps its children in both TrackerProvider and LocationProvider.

TrackingContextProvider = (props: {
children: ReactNode | ((parameters: TrackingContext) => ReactNode),
tracker: ReactNativeTracker,
locationStack?: LocationStack
}) => Context.Provider
info

Under normal circumstances there's no need to use this context, since ObjectivProvider wraps its children in it.

The main use case for adding another TrackingContextProvider is to reconfigure or swap the ReactNativeTracker instance with a new one and/or to initialize the LocationStack for a branch of Components.

This may be necessary for utilizing different configurations, e.g. for privacy reasons.

Parameters

typedefault value
requiredchildrenReactNode | ((parameters: TrackingContext) => void)
requiredtrackerReactNativeTracker
optionallocationStackLocationStack[]

Returns

Context.Provider