diff --git a/src/rules/reactivity.ts b/src/rules/reactivity.ts index 50665c3..e20911c 100644 --- a/src/rules/reactivity.ts +++ b/src/rules/reactivity.ts @@ -895,6 +895,7 @@ export default createRule({ "untrack", "mapArray", "indexArray", + "observable", ], callee.name ) || diff --git a/test/rules/reactivity.test.ts b/test/rules/reactivity.test.ts index 7dd1e26..3fa55cc 100644 --- a/test/rules/reactivity.test.ts +++ b/test/rules/reactivity.test.ts @@ -293,6 +293,11 @@ export const cases = run("reactivity", rule, { const staticValue = () => props.value; const value = staticValue(); }`, + // observable + `function Component(props) { + const count$ = observable(() => props.count); + return
; + }`, ], invalid: [ // Untracked signals