Version
"@rsbuild/core": "^1.2.4",
Details
React 19 is not compatible with some APIs of React 18, and the React render method is invalid, resulting in the failure of the message components of Ant Design or Arco Design to pop up prompts normally.
It is recommended that the react version of the template in the create-rsbuild package be downgraded to 18, because react 19 is not compatible with the mainstream UI library, and the upgrade is a bit redundant.
Reproduce link
npm create rsbuild@latest
Reproduce Steps
- run
npm create rsbuild@latest
- run
npm install antd
- in
APP.tsx
import { Button, message } from "antd";
const App = () => {
const handleClick = () => {
message.success('hello')
}
return (
<div className="content">
<Button onClick={handleClick}>click</Button>
</div>
);
};
export default App;
- run
npm run dev
Open the browser, click the button, message.success does not trigger. The same is true for arco desgin。