material-ui Drawer – findDOMNode is deprecated in StrictMode

According to Material-ui changelog, it should be solve in V5, which is still in alpha. It seems that at least in some cases this issue cause by createMuiTheme. You can solve this issue by using the experimental (unstable) theme creator If you want to get the experimental theme creator instead of removing React.StrictMode, you can … Read more

Understanding the React Hooks ‘exhaustive-deps’ lint rule

The reason the linter rule wants onChange to go into the useEffect hook is because it’s possible for onChange to change between renders, and the lint rule is intended to prevent that sort of “stale data” reference. For example: const MyParentComponent = () => { const onChange = (value) => { console.log(value); } return <MyCustomComponent … Read more

How to start search only when user stops typing?

Implement using useEffect hook: function Search() { const [searchTerm, setSearchTerm] = useState(”) useEffect(() => { const delayDebounceFn = setTimeout(() => { console.log(searchTerm) // Send Axios request here }, 3000) return () => clearTimeout(delayDebounceFn) }, [searchTerm]) return ( <input autoFocus type=”text” autoComplete=”off” className=”live-search-field” placeholder=”Search here…” onChange={(e) => setSearchTerm(e.target.value)} /> ) }

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)