FynMesh API
    Preparing search index...

    Function useMiddleware

    • Attach middleware metadata to a FynUnit

      Type Parameters

      Parameters

      Returns UnitT

      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 }; }
      }
      );