Commit 8f19a74
docs(react-db): add CRITICAL mistakes for === in where and useLiveQuery destructuring
AI agents frequently make two mistakes that cause runtime crashes:
1. Using `===` instead of `eq()` in `.where()` callbacks — returns a
boolean instead of a query expression, throwing
InvalidWhereExpressionError
2. Assigning `useLiveQuery()` directly to a variable instead of
destructuring `{ data }` — then calling `.map()` on the result
object, throwing "map is not a function"
Both are documented in db-core/live-queries but agents often only read
the react-db skill. Adding the warnings here where they'll actually
be seen.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent dd16655 commit 8f19a74
1 file changed
Lines changed: 42 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
302 | 302 | | |
303 | 303 | | |
304 | 304 | | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
305 | 347 | | |
306 | 348 | | |
307 | 349 | | |
| |||
0 commit comments