taro-react-apollo-hooks
v0.5.1
Published
`apollo-hooks` for `@tarojs/taro`
Downloads
8
Readme
taro-react-apollo-hooks
apollo-hooks
for @tarojs/taro
Fork from react-apollo-hooks (which already merged to official React Apollo Hooks)
tune-ment
- replace all
require("react")
torequire("@tarojs/taro")
usage
import client from './apollo-client';
const QUERY = gql`
{
hi
}
`;
// 为 useQuery 传入 client 参数即可
const { loading, error, data } = useQuery(QUERY, { client: overrideClient });