Lime Web Components API Documentation - v7.4.0
    Preparing search index...

    Function SelectContext

    • Beta

      Decorator that consumes a ContextMap key, assigning the resolved value to the decorated property and updating it on every change. Compose with Stencil's @State() to trigger a re-render.

      Type Parameters

      Parameters

      Returns PropertyDecorator

      A PropertyDecorator that wires up the subscription.

      import { State } from '@stencil/core';
      import { SelectContext, User } from '@limetech/lime-web-components';

      class MyComponent {
      @State()
      @SelectContext('user')
      private user: User;
      }