Hook & CompanyOwnershipProvider
Through the useCompanyOwnershipContext
hook, users gain access to the company ownership model, allowing them to utilize its
functions for further customization of the interaction with the diagram.
This hook is accessible only when used in a child component of a CompanyOwnershipProvider
. This condition is consistently
met when implementing child components for the CompanyOwnership
component. However, if the hook is called outside the
company ownership component, the CompanyOwnershipProvider
must be a common ancestor.
The following example demonstrates how to use the hook for a button in a sidebar or a customized context menu.