需要阅读的文章: https://overreacted.io/zh-hans/a-complete-guide-to-useeffect/ # 作者是 Dan Abramov,React 核心开发者 https://github.com/dt-fe/weekly/tree/master #
如果只是需要使用更改的数据:
const { loading, data, error } = useQuery(SOME_QUERY)
if (loading) return <Loader />
if (error) return <Error />