0.0.1 • Published 5 years ago

remax-hooks v0.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
5 years ago

remax-hooks

小程序 API 的 hooks 封装。

示例

import * as React from 'react';
import { View } from 'remax/alipay';
import { useAuthCode } from 'remax-hooks/alipay';

export default () => {
  const [res, error] = useAuthCode();

  return <View>{!error ? res.authCode : '授权失败'}</View>;
};