watch-of-a-prop-that-is-not-there
This fails the run. Where it is wrong about your code, // ramonda-check-ignore <reason> on the line says so, and the reason is printed on every run.
Reported when a @watchProp selector names something the component's props type does not declare, so the method never runs.
The selector IS the declaration: @watchProp((p) => p.userId) says to run the method when
userId changes. Naming something that is not a prop makes the selector read undefined on
every render, which never differs from the undefined before it — so the method never runs,
for the whole life of the component. Nothing throws. The reaction is simply absent, and
whatever it kept in step drifts.
Usually it is a rename that reached the props type and not the selector, or a typo. Check the spelling against the props the report lists.
tsc refuses this too — until somebody writes (p: any) => …, a @ts-ignore, or widens the
props type for an unrelated reason. That is why it is checked here as well.
Next
- All rules — the other checks this one runs beside.
- Checking your app — how to run it, and what it proves.