@msalek/controllers
v1.3.1
Published
React / Next.js controllers handler for a lifecycle tasks. All autostart things in one place.
Downloads
136
Readme
Controllers handler for React
React / Next.js controllers handler for a lifecycle tasks. All autostart things in one place.
Usage:
children?:
Bypass for a children, when you need it as a composition.autostartFunctions?:
Pure void functions. Runs once on load.userInteractionFunctions?:
Pure void functions. Runs once on load, by after user interaction (e.g. google analytics).hookControllers?:
React hooks. Pinned to body of React component and uses a React app lifecycle.JSXControllers?:
Components runs as a composition. Example: snackback - needed to run once, but has own mandatory JSX component.
All edge types .d.ts
are possible to import.