Capturing errors

Whenever the route is unknown, Bemtv will warn you through the onRouteUnfound() function which accepts a listener/callback as the first argument:

import { onRouteUnfound } from "bemtv";

onRouteUnfound(() => {
  console.log("We are on an unknown route :(");
});

Last updated