mirror of
https://github.com/vale981/Vulcan
synced 2025-03-10 20:46:40 -04:00
14 lines
370 B
JavaScript
14 lines
370 B
JavaScript
import { addCallback } from 'meteor/vulcan:core';
|
|
import { initFunctions } from '../modules/index.js';
|
|
|
|
// on client, init function will be executed once App is ready
|
|
export const addInitFunction = fn => {
|
|
initFunctions.push(fn);
|
|
};
|
|
|
|
function runInitFunctions(props) {
|
|
initFunctions.forEach(f => {
|
|
f(props);
|
|
});
|
|
}
|
|
addCallback('app.mounted', runInitFunctions);
|