Trying call useQuery after “if” in React app

后端 未结 0 425
灰色年华
灰色年华 2020-11-28 12:36

In my react app I receive gql after some function\'s work and I try to call apollo hook like this:

...
let data = {};
if(gqlQuery)
  data = useQuery(gqlQuery)         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题