πŸ‘‚Plugin entrypoint

gnarpy from regretevator cutting a xan cake
src/index.ts
import { General } from "@vendetta/ui/components";

const { Text } = General;

export const onLoad = () => console.log("Plugin loaded!");
export const onUnload = () => console.log("Plugin loaded!");
export const Settings = () => <Text style={{ color: "#000" }}>Hello!</Text>;
  • onLoad β€” A function that gets called when the plugin gets enabled

  • onUnload β€” A function that gets called when the plugin gets disabled

  • Settings β€” A React JSX component, serves as the settings for the plugin

A plugin only gets ran when the user enables it. So this piece of code:

does the same thing as this piece of code:

However it's recommended to keep your initial code in onLoad, incase this changes in the future

Last updated

Was this helpful?