What do you want to save?
Add Code snippet
New code examples
-
Javascript 2022-02-07 07:10:24
how to set dynamic autocomplete with material ui
import React, { useState } from 'react'; using useState: const [val,setVal]=useState({}) changin value on click of button const handleClick = () => { setVal(top100Films[0]);//you pass any value from the array of top100Films // set value ... Add solution -
Javascript 2021-10-06 06:05:03
setting react state with produce immer
//Initialising State const [filters, setFilters] = useState({}); //Setting State setFilters((filters) => ( produce(filters, draftFilters => { if (param[0] === 'page') { draftFilters.page = parseInt(param[1], 10) ... Add solution