MCPcopy Create free account
hub / github.com/EasyWebApp/WebCell / observer

Function observer

source/decorator.tsx:137–141  ·  view source on GitHub ↗
(func: T, _?: ClassDecoratorContext)

Source from the content-addressed store, hash-verified

135): AwaitedComponent<T>;
136export function observer<T extends ObservableComponent>(func: T): AwaitedComponent<T>;
137export function observer<T extends ObservableComponent>(func: T, _?: ClassDecoratorContext) {
138 return isHTMLElementClass(func)
139 ? wrapClass(func)
140 : (props: object) => <FunctionCell component={(() => func(props)) as FC | AFC} />;
141}
142
143/**
144 * `accessor` decorator of MobX `@observable` for HTML attributes

Callers 4

MobX.spec.tsxFile · 0.90
Async.spec.tsxFile · 0.90
Home.tsxFile · 0.90
Clock.tsxFile · 0.90

Calls 1

wrapClassFunction · 0.85

Tested by

no test coverage detected