Umi: useIntl 单元测试报错,找不到

Created on 6 May 2020  ·  3Comments  ·  Source: umijs/umi

import React from 'react';
import { useIntl } from 'umi';

const Demo = () => {
  const intl = useIntl()
  return (
    <Button />
  );
};

export default Demo;

解决方案是什么?

console.error
      Error: Uncaught [TypeError: (0 , _umi.useIntl) is not a function]

Most helpful comment

我也遇到了这个问题,请问解决了吗?

All 3 comments

同问

我也遇到了这个问题,请问解决了吗?

Was this page helpful?
0 / 5 - 0 ratings