That will do. In my case the component is either there or it’s not. I do not use the enabling or disabling functionality.
BTW, do you happen to know if we can also get access to the config array that we pass to the app during initialization? All the information of how the application is configured is also there.
From what I investigated, though it seems the config array is not kept as is but it is expanded with a foreach loop.
If component being enabled or not is a matter, then instead of using hasComponent() it is better to check whether getComponent() returns NULL or not. According to documentation, it will return NULL, if the application component is disabled or does not exist. So, you can check this way, for any component that has to exists and has to be enabled in the same time.