Skip to content

[Bug]: The project created by rsbuild-cli uses react 19 by default, which will cause incompatibility with some components of antd design and acro design. #4595

@senfish

Description

@senfish

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

  1. run npm create rsbuild@latest
  2. run npm install antd
  3. 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;
  1. run npm run dev

Open the browser, click the button, message.success does not trigger. The same is true for arco desgin

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions