Mapbox Version
default
React Native Version
0.81.5
Platform
iOS
@rnmapbox/maps version
10.3.1
Standalone component to reproduce
import React, { useEffect, useRef } from 'react';
import { MapView, Viewport } from '@rnmapbox/maps';
function BugReport() {
const viewportRef = useRef<Viewport>(null);
useEffect(() => {
viewportRef.current?.transitionTo({kind: "followPuck"})
}, [])
return (<MapView>
<Viewport ref={viewportRef} />
</MapView>)
}
Observed behavior and steps to reproduce
Calling transitionTo without a transition specified (allowed by the type) throws a "Mapbox [error] no kind found in state" error.
This is both a non-descriptive error (there is a kind in the state, just not one in the transition) and also a type mismatch between typescript and swift.
Expected behavior
transitionTo should work without a transition specified, defaulting to "default."
Notes / preliminary analysis
I can see the guard in toTransition in RNMBXViewport.swift which causes this error.
Additional links and references
No response
Mapbox Version
default
React Native Version
0.81.5
Platform
iOS
@rnmapbox/mapsversion10.3.1
Standalone component to reproduce
Observed behavior and steps to reproduce
Calling
transitionTowithout a transition specified (allowed by the type) throws a "Mapbox [error] no kind found in state" error.This is both a non-descriptive error (there is a kind in the state, just not one in the transition) and also a type mismatch between typescript and swift.
Expected behavior
transitionTo should work without a transition specified, defaulting to "default."
Notes / preliminary analysis
I can see the
guardintoTransitioninRNMBXViewport.swiftwhich causes this error.Additional links and references
No response