AhmedYahya24 / spzceX

0 stars 1 forks source link

Modifying library components #16

Open NouraldinS opened 2 years ago

NouraldinS commented 2 years ago

In many cases, you'll need to modify the components provided by a library - like antd -, so the best practice is to import that component into a file, like:

import { Modal } from 'antd';
const SpaceModal = (props) => <Modal {...props} />;

This is useless as it is, but it's not harmful, and it leaves you with the option to edit the SpaceModal once you need to, rather than going over the entire application looking for occurrences of Ant design's modal.