我需要将值从axios.get方法值推入数组

时间:2019-07-18 12:06:48

标签: node.js reactjs react-hooks

我需要将值推入数组..但是在这里,我不能给任何人提供解决方案

axios.get('http://localhost:8011/api/social/finddata')
                            .then((res) => {
                            const items=res.data;
                                setUse(items);
                                //console.log("##",theArray)
                            })
                            .catch((error) => {
                                console.log('error block called',error);
                            })

0 个答案:

没有答案
相关问题