useEffect(async () => { setLoading(false); const res = await api.get('/clients'); console.log('get clients'); console.log(res); setClients(res.result); }, []); const getClients = async () => { const res = await api.get('/clients'); console.log('get clients'); console.log(res); setClients(res.result); }; useEffect(() => { setLoading(false); getClients(); }, []);
![react-router-domのLinkで遷移時に destroy is not a function TypeError: destroy is not a function のエラーが出る時のエラー回避方法 - Qiita](https://cdn-ak-scissors.b.st-hatena.com/image/square/c464b015c73c8715535edfc6a763c060c1e21bf3/height=288;version=1;width=512/https%3A%2F%2Fqiita-user-contents.imgix.net%2Fhttps%253A%252F%252Fcdn.qiita.com%252Fassets%252Fpublic%252Farticle-ogp-background-9f5428127621718a910c8b63951390ad.png%3Fixlib%3Drb-4.0.0%26w%3D1200%26mark64%3DaHR0cHM6Ly9xaWl0YS11c2VyLWNvbnRlbnRzLmltZ2l4Lm5ldC9-dGV4dD9peGxpYj1yYi00LjAuMCZ3PTkxNiZoPTMzNiZ0eHQ9cmVhY3Qtcm91dGVyLWRvbSVFMyU4MSVBRUxpbmslRTMlODElQTclRTklODElQjclRTclQTclQkIlRTYlOTklODIlRTMlODElQUIlMjBkZXN0cm95JTIwaXMlMjBub3QlMjBhJTIwZnVuY3Rpb24lMjBUeXBlRXJyb3IlM0ElMjBkZXN0cm95JTIwaXMlMjBub3QlMjBhJTIwZnVuY3Rpb24lMjAlRTMlODElQUUlRTMlODIlQTglRTIlODAlQTYmdHh0LWNvbG9yPSUyMzIxMjEyMSZ0eHQtZm9udD1IaXJhZ2lubyUyMFNhbnMlMjBXNiZ0eHQtc2l6ZT01NiZ0eHQtY2xpcD1lbGxpcHNpcyZ0eHQtYWxpZ249bGVmdCUyQ3RvcCZzPWE4ZTI4ODlhNWE0YzFjYmE4ZDNlNDg3OGNlMDZkMjIy%26mark-x%3D142%26mark-y%3D112%26blend64%3DaHR0cHM6Ly9xaWl0YS11c2VyLWNvbnRlbnRzLmltZ2l4Lm5ldC9-dGV4dD9peGxpYj1yYi00LjAuMCZ3PTcxNiZ0eHQ9JTQwa2VubWFybyZ0eHQtY29sb3I9JTIzMjEyMTIxJnR4dC1mb250PUhpcmFnaW5vJTIwU2FucyUyMFc2JnR4dC1zaXplPTMyJnR4dC1hbGlnbj1sZWZ0JTJDdG9wJnM9YWZlYzZmZTdkNTRiYjlmYzVkM2I5YTNmYzk4NTgyZDI%26blend-x%3D142%26blend-y%3D491%26blend-mode%3Dnormal%26s%3D94fd74bf9ff2bb1c3bda7f7e4553f3f9)