What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-10-27 04:41:14
react check if string is mail
let handleOnChange = ( email ) => { // don't remember from where i copied this code, but this works. let re = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}... Add solution -
Other 2021-10-25 09:45:06
import provider from 'react-redux'
import { Provider } from 'react-redux' 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 -
-
Javascript 2021-10-10 12:03:05
React Load api data with Loading indicator
import React, { Fragment, useState, useEffect } from 'react'; import axios from 'axios'; function App() { const [data, setData] = useState({ hits: [] }); const [query, setQuery] = useState('redux'); const [url, setUrl] = useState( 'https://hn.... Add solution
Best helpers
Rocky DeHart
+5
Cynthia
+5
Eve noonan
+5
Martinako
+5
Numeri
+5
John Weisz
+5
Tammy Lin
+5
Flyeogh
+5
SunnyHills
+5
Ishan Yadav
+5
Aown Ali
+5
Terry3497
+5
Xkcvk2511
+5
Jean Luis
+5