What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-11-14 08:17:19
añadir react a node project
import React, { Component } from 'react';import logo from './logo.svg';import './App.css';class App extends Component { constructor(){ super() this.state = { numero: 0 } this.handleRandom = this.handleRandom.bind(this) this.handleRand... Add solution -
Javascript 2021-10-23 00:23:07
React Custom Hook to load data using API
const useDataFetching = () => { const [data, setData] = useState({ hits: [] }); const [url, setUrl] = useState( 'https://hn.algolia.com/api/v1/search?query=redux', ); const [isLoading, setIsLoading] = useState(false); const [isError, setI... Add solution -
Other 2021-10-19 19:51:09
how to get elevation with google elevation api
const [currentLatitude, setCurrentLatitude] = useState(0); const [currentLongitude, setCurrentLongitude] = useState(0); const [currentElevation, setCurrentElevation] = useState(0); useEffect( async () => { try { const res = await fetch(`ht... Add solution