Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

useIntl 单元测试报错,找不到 #4598

Closed
six-666 opened this issue May 6, 2020 · 3 comments
Closed

useIntl 单元测试报错,找不到 #4598

six-666 opened this issue May 6, 2020 · 3 comments

Comments

@six-666
Copy link

six-666 commented May 6, 2020

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]
@susiachen
Copy link

同问

@leopen-hu
Copy link

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

@xiaohuoni
Copy link
Member

相同的问题 #4358

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants