This pattern focuses on implementing reusable widgets in React that are exposed via an imperative API. Using useImperativeHandle,
React's internal components can be controlled directly from the outside.
This approach is ideal when a component needs to be managed outside React's normal flow, such as in applications integrating third-party systems or components with customized lifecycles.
In this case, we will document a general pattern for externally controllable widgets, using a simple example that demonstrates how to implement this functionality with an injectable key.