1

I'm importing the Button component from our design-system. I want to import it multiple times by renaming it (e.g. import {Button as Btn, Button as MyBtn} from 'design-system' and then assign different displayName to them, via:

Btn.displayName = 'Btn';
MyBtn.displayName = 'MyBtn';

React however is giving MyBtn to all the Buttons present in the component. How can I achieve my objective?

Ken White
  • 123,280
  • 14
  • 225
  • 444
Ale TheFe
  • 1,540
  • 15
  • 43

0 Answers0