ComponentActivity를 보면
package androidx.activity;
public class ComponentActivity extends androidx.core.app.ComponentActivity implements
ContextAware,
LifecycleOwner,
ViewModelStoreOwner,
HasDefaultViewModelProviderFactory,
SavedStateRegistryOwner,
OnBackPressedDispatcherOwner,
ActivityResultRegistryOwner,
ActivityResultCaller,
OnConfigurationChangedProvider,
OnTrimMemoryProvider,
OnNewIntentProvider,
OnMultiWindowModeChangedProvider,
OnPictureInPictureModeChangedProvider,
MenuHost {
...
}
로 되어 있습니다. ComponentActivity가 클래스 이름은 같지만 패키지 이름은 다르네요. 따라서 아마도 ComponentActivity의 패키지명 때문에 헷갈리신 것 같아요. viewModels extension function은 androidx.activity.ComponentActivity의 extension function이구요.