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

[BUG] Attempted import error: 'findDOMNode' is not exported from 'react-dom' (imported as 'findDOMNode') #2615

Open
1 task done
samuel-xiangpeng opened this issue Dec 7, 2024 · 1 comment

Comments

@samuel-xiangpeng
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Which Component

Toast

Semi Version

2.71.0

Current Behavior

版本:[email protected] [email protected]
通过Next引入Semi-ui,运行项目后控制台直接提示
Attempted import error: 'findDOMNode' is not exported from 'react-dom' (imported as 'findDOMNode').
Toast组件使用不了!

Expected Behavior

能正常使用Toast,控制台不报错!

Steps To Reproduce

--

ReproducibleCode

import React from "react";
import { observer } from "mobx-react-lite"
import { useThemeStore } from "@/store/theme";
import { Button, Toast } from '@douyinfe/semi-ui';

function Home() {

  const store = useThemeStore();

  return (
    <React.Fragment>
      <Button onClick={() => {
        Toast.warning({ content: 'welcome' })
        store.updateParams({
          theme: store.theme === 'light'? 'dark' : 'light'
        })
      }} type="warning">Hello Semi</Button>
    </React.Fragment>
  )
}

export default observer(Home)

Environment

- OS: MACOS15.1.1 (24B91)
- browser: Version 131.0.6778.109 (Official Build) (arm64)

Anything else?

--

@samuel-xiangpeng
Copy link
Author

CleanShot 2024-12-08 at 00 20 28@2x

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

1 participant