[Solved] destroy is not a function TypeError: destroy is not a function

2023/05/20 17:42

Error

When using Link of react-router-dom to redirect page, I got this error:

destroy is not a function TypeError: destroy is not a function

Solution

Just seperate the runinning code and make it a function.

const getResult = async () => {
       setClients(res.result);
};

useEffect(() => {
    setLoading(false);
    getResult();
}, []);

 

Leave a Reply

Back to top