I have done the api call this way, I am able to see the return array in network, it has a single array with store details, I have to output the store name, how to render it, I am familiar with map function to display lista. How to render a single output
import StoreService from "../../services/Store/store.service";
import { Store } from "../../models/Store/store.model";
interface OfferListProps {
activeStoreId: string;
}
function Overview(props: OfferListProps) {
const { activeStoreId } = props;
const [loading, setLoading] = useState(false);
const [stores, setStores] = useState<Store[]>([]);
const handleFetchStore = () => {
StoreService.fetchStores(
(store: Store[]) => {
setStores(stores);
},
() => { },
() => { }
);
};
useEffect(() => {
if (activeStoreId) {
handleFetchStore();
}
}, [activeStoreId]);

StoreService.fetchStoresfor a single store display?StoreServiceto find something likefetchStore(notfetchStores) that would help you get a single store by store id. If it's not there, I can help you out with a workaroundshowStoreinStoreServicestatic showStore( storeId: string, onSuccess: Function, onError: Function, onFinal: () => void ) { const API_URL = ApiRoutes.STORES_URL + '/' + storeId; return axiosInstance .get(API_URL) .then(response => { const store = deserialize(Store, response.data["store"]); onSuccess(store); }) .catch(error => { onError(error); }) .finally(() => { onFinal(); }) }