I am building a custom admin component for Joomla!4 that includes an API.
To access the component's config I am using, on the API Controller file:
$params = ComponentHelper::getComponent('com_mycomponent')->getParams();
It seems a bit off to me to have go via the Component Helper to get my own component's params - in spite am I working on the API part of the code.
It works fine, but is that the proper way?
Thanks in advance.