Technical requirements
When using PCF, the licensing requirements depend on the capabilities of the component. If it doesn't connect to external services or data sources, then it will only require a minimum license of Microsoft 365. On the other hand, connecting external services, including Dataverse for model-driven components, involves using a Power Apps license.
For more information, please refer to https://docs.microsoft.com/en-us/powerapps/developer/component-framework/overview#licensing
The complete code solution, as well as the canvas app using it, is available in our GitHub repository located at https://github.com/PacktPublishing/Microsoft-Power-Apps-Cookbook/tree/master/Chapter11