Last updated 2 years ago
To check if a component is available, we can use the hasComponent() method which accepts an argument that is the name of the component:
hasComponent()
import { hasComponent } from "bemtv"; if (hasComponent("App")) { //... }