Checking available components

To check if a component is available, we can use the hasComponent() method which accepts an argument that is the name of the component:

import { hasComponent } from "bemtv";

if (hasComponent("App")) {
  //...
}

Last updated