field-read-before-it-is-declared
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 hook's props callback reads a field declared below the use, which is not set yet when the callback first runs — a bare TypeError at mount for a hook, undefined for good for a plain field.
this.use calls the props callback at once, while the fields are being set from the top down.
A field declared lower down is not there yet: a hook there throws a TypeError at mount that
names nothing, and a plain field reads undefined — for good, since it is not a signal and the
callback is not asked again. Move the field above the use that reads it: declare hooks in the
order they depend on each other.
Next
- All rules — the other checks this one runs beside.
- Checking your app — how to run it, and what it proves.