Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Interface Naming Convention (Interface Name clashes with Component Name)

I have an interface called Widget which is used throughout my project. However, it is also used as props for a component called Widget.

What is the best way to handle this? Should I change the name of my Widget interface? I've seen other people talk about NOT using IWidget, but no one talks about what to do instead. Thanks!


1 Answers

The convention is to use the Props suffix.

Example

For Widget it would be WidgetProps.

like image 150
basarat Avatar answered Oct 20 '25 18:10

basarat