Skip to content
Advertisement

Tag: react-google-maps-api

React get value from a class

I have a component where i get the distance from one point to another, with Google Maps (DirectionsRenderer). What i want, is to use this data in a h1 This is my return EDIT: ShowProduct.js (This is where i get the distance) ProductCard.js (This is where want to use it) Answer You need to set up a state using useState

Advertisement