# defineEntity
This composable is used in Page-component to determine the entity based on the previous entity.
For example:
/customers/:customerId/contacts/:contactId
The previous injected entity was customers, so this entity is contacts.
If the $entity is not defined yet, it means that we are in the root. So, in the above example the first entity is customers.
TIP
Learn more about the provide/inject (opens new window) concept