-
Notifications
You must be signed in to change notification settings - Fork 0
Hooks
MohammadAli Arjomand edited this page Sep 6, 2023
·
3 revisions
SinglightJs has 2 Lifecycle hooks, beforeMount and afterMount. For use that's run this command
node singlighter make:hook beforeMount # or afterMountThis command, will create a file in ./Scripts/Hooks/beforeMount.js
export default function beforeMount() {
// codes are here
}For working hooks, open ./Scripts/Hooks/Fisher.js then import the Hook
import beforeMount from "./beforeMount.js";And add it in the object
export default {
beforeMount
};NOTE This object will import in
App.json line3and pass toSinglight.hookson line7
MIT License, Copyright (c) 2023 MohammadAli Arjomand