the-bugging
v1.1.5
Published
TheBugging is a simple and lightweight library for logging and debugging your code.
Downloads
20
Readme
the-bugging
Table of Contents
Requirements
- Grab your projectKey at www.thebugging.com.
P.S.: This is only for web projects as it heavily depends on the DOM window.
P.S.2: It is SSR ready for projects using Next.js but still only meant to be run on the client.
Installation
- First, add the dependency to your project
npm install the-bugging
- Or alternatively, with yarn:
yarn add the-bugging
- With a valid projectKey, simply start at the very top of your web project like so:
import TheBugging from "the-bugging";
TheBugging.init({ projectKey: "VALID-PROJECT-KEY" });
- Create React App index.jsx:
import { createRoot } from "react-dom/client";
import TheBugging from "the-bugging";
import App from "./App";
TheBugging.init({ projectKey: "VALID-PROJECT-KEY" });
const rootElement = document.getElementById("root");
const root = createRoot(rootElement!);
root.render(<App />);
- Next.js _app.jsx
import TheBugging from "the-bugging";
function MyApp({ Component, pageProps }) {
TheBugging.init({ projectKey: "VALID-PROJECT-KEY" });
return <Component {...pageProps} />;
}
export default MyApp;