Antd (React UI library)

antd

Ant Design, short for antd, is a UI library for React.js. It is the world's second most popular React UI framework.

Install

You can use npm or yarn or pnpm or bun to install antd.

npm install antd --save
yarn add antd
pnpm install antd --save
bun add antd

Usage

import React from 'react';
import { Button } from 'antd';

export default function Page() {
  return(
      <>
        <Button type="primary">PRESS ME</Button>
      </>)
}


Related

[antd: Message] You are calling notice in render which will break in React 18 concurrent mode. Please trigger in effect instead.

I'm getting this error when using MessageWarning: [antd: Message] You are calling notice in render which will break in React 18 concurrent mode. Please trigger in effect instead.Here is my code:import { message } from 'antd'; export default function Page() { const [messageApi, contextHolder] = message.useMessage(); const res = await fetch("/api/...", { method: "POST", }); if (!res.ok) { messageApi.error("Error! Fail to login!"); } return ( &lt;Home&gt; ... &lt;/Home&gt; ) }
2024-07-21 00:08:18
Get connected with us on social networks! Twitter

©2024 Guangzhou Sinephony Technology Co., Ltd All Rights Reserved