function _updateStateFromProps(state, props) {
    var stateChanges = {
      latitude: props.latitude,
      longitude: props.longitude,
      zoom: props.zoom,
      width: props.width,
      height: props.height,
      mapStyle: props.mapStyle,
      startDragLngLat: props.startDragLngLat && props.startDragLngLat.slice()
    };

    assign(stateChanges, {
      prevLatitude: state.latitude,
      prevLongitude: state.longitude,
      prevZoom: state.zoom,
      prevWidth: state.width,
      prevHeight: state.height,
      prevMapStyle: state.mapStyle
    });

    mapboxgl.accessToken = props.mapboxApiAccessToken;

    return stateChanges;
  }
// Use props to create an object of state changes.
Use props to create an object of state changes.
Use props to create an object of state changes .
function _updateStateFromProps(state, props) {
    var stateChanges = {
      latitude: props.latitude,
      longitude: props.longitude,
      zoom: props.zoom,
      width: props.width,
      height: props.height,
      mapStyle: props.mapStyle,
      startDragLngLat: props.startDragLngLat && props.startDragLngLat.slice()
    };
    assign(stateChanges, {
      prevLatitude: state.latitude,
      prevLongitude: state.longitude,
      prevZoom: state.zoom,
      prevWidth: state.width,
      prevHeight: state.height,
      prevMapStyle: state.mapStyle
    });
    mapboxgl.accessToken = props.mapboxApiAccessToken;
    return stateChanges;
  }
function _updateStateFromProps ( state , props ) { var stateChanges = { latitude : props . latitude , longitude : props . longitude , zoom : props . zoom , width : props . width , height : props . height , mapStyle : props . mapStyle , startDragLngLat : props . startDragLngLat && props . startDragLngLat . slice ( ) } ; assign ( stateChanges , { prevLatitude : state . latitude , prevLongitude : state . longitude , prevZoom : state . zoom , prevWidth : state . width , prevHeight : state . height , prevMapStyle : state . mapStyle } ) ; mapboxgl . accessToken = props . mapboxApiAccessToken ; return stateChanges ; }
Use props to create an object of state changes.
Use props to create an object of state changes .