Function liveStateProperty

  • This decorator will cause a property to be updated from the state on any state change. It takes an optional expression to pull the value from the state, otherwise it will assume there exists a property on the state of the same name.

    Example:

    class DecoratedElement extends LitElement {

    @liveStateProperty()
    foo: string = 'bar';

    @liveStateProperty('bing.baz.bar')
    nested: string;

    }

    Parameters

    • Optional path: string

    Returns ((proto: any, propertyName: any) => void)

      • (proto: any, propertyName: any): void
      • Parameters

        • proto: any
        • propertyName: any

        Returns void

Generated using TypeDoc