答案 0 :(得分:0)
没有代码很难评估,但这在NextJS中对我来说很好。可能是您在调用useQuery
钩子的地方
function App (){
const { loading, error, data: { listCourses: courses } = {} } = useQuery(
listCourses(),
{
variables: { type: "online" },
}
);
return (
<Layout>
{something}
</Layout>
);
};