Is it possible in react to assign promise data value to outside variable?

I want to do something like:

```
export default class LocationSearchInput extends Component {
constructor(props) {
    super(props);
    this.state = {address: ''}
}

handleChange = (address) => {
    this.setState({ address });
};

handleSelect = (address) => {
    geocodeByAddress(address)
        .then(results => getLatLng(results[0]))
        .then(latLng => console.log(latLng))
        .catch(error => console.error('Error', error));
};
render() { ........

```

In this example, I get what I want: latLng, but i can't use it outside. Its inside SearchBox.js file I want to include it inside another Map.js file. I’m new to this, many thanks!