Logger
log
Colored console logs that are printed only when devMode is enabled in the <BetterHtmlProvider> config, so they can stay in production code.
import { log } from "react-better-html";
log.success("User created");
log.info("Fetching users...", true); // bold
log.warn("Token expires soon");
log.error("Request failed");
log.log("Custom", { color: "magenta", backgroundColor: "black", bold: true });
log.json({ id: 1, name: "John" });
log.divider();
log.trace();
The available colors are black, red, green, yellow, blue, magenta, cyan and white.