Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

fetch api map

const GetData = [];
  useEffect(() => {
    fetch(API_URL)
      .then((res) => res.json())
      .then((data) => {
        GetModesData.push(...data);
        setDataState(GetData.map((d) => d.modeName));
      });
  }, []);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #fetch #api #map
ADD COMMENT
Topic
Name
4+7 =