Attach middleware metadata to a FynUnit
Middleware declarations (single or array)
The FynUnit to attach middleware to
The same unit with __middlewareMeta attached
export const main = useMiddleware( [ { mw: import('pkg/middleware/theme/theme', { with: { type: 'fynapp-middleware' } }), config: { theme: 'dark' }, }, ], { execute(runtime) { return { type: 'component', component: MyComponent }; } }); Copy
export const main = useMiddleware( [ { mw: import('pkg/middleware/theme/theme', { with: { type: 'fynapp-middleware' } }), config: { theme: 'dark' }, }, ], { execute(runtime) { return { type: 'component', component: MyComponent }; } });
Attach middleware metadata to a FynUnit