0.5.1 • Published 5 years ago

taro-react-apollo-hooks v0.5.1

Weekly downloads
4
License
MIT
Repository
github
Last release
5 years ago

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") to require("@tarojs/taro")

usage

import client from './apollo-client';
const QUERY = gql`
  {
    hi
  }
`;
// 为 useQuery 传入 client 参数即可
const { loading, error, data } = useQuery(QUERY, { client: overrideClient });