skip to Main Content

Javascript – How to pass value to another file?

How to pass value of 'row' to EditRecord (child file)? Once I'm on EditRecord page, the props (record) of the parent's file's gone. Parent File: const [record, setRecord] = React.useState({}); return ( <TableBody> {stableSort(props.data, getComparator(order, orderBy)) .slice(page * rowsPerPage, page…

VIEW QUESTION

Reactjs – react read data after setData

const useCustomState = () => [value, setValue]; const [data, setData] = useCustomState(initValue); useEffect(() => { const fn = async() => { await setData(1); console.log(data); // ouput 1 }; fn(); }, []) How to implement this custom hooks function can get…

VIEW QUESTION
Back To Top
Search