I am creating a v2 for my UI. I want to keep the old UI and make changes. So I was thinking of keeping the name of new component same as old one.
So it is possible to have 2 different component with same name?
What you could do is have two Classes one old and one new, with semantic naming rather than new and old of course, and within the master component class, have the logic for switching between the two.
or you could import as Alias, which means both classes can be the same name but where you use it obviously has to be different:
import { MyComponent as OldComponent } from '../old/my-component'
import { MyComponent} from '../new/my-component'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With