Skip to content

Commit 0efe031

Browse files
authored
Update 07-$inspect.md (#14048)
moved note to top
1 parent ee2f4a2 commit 0efe031

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

documentation/docs/02-runes/07-$inspect.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
title: $inspect
33
---
44

5+
> [!NOTE] `$inspect` only works during development. In a production build it becomes a noop.
6+
57
The `$inspect` rune is roughly equivalent to `console.log`, with the exception that it will re-run whenever its argument changes. `$inspect` tracks reactive state deeply, meaning that updating something inside an object or array using fine-grained reactivity will cause it to re-fire ([demo](/playground/untitled#H4sIAAAAAAAACkWQ0YqDQAxFfyUMhSotdZ-tCvu431AXtGOqQ2NmmMm0LOK_r7Utfby5JzeXTOpiCIPKT5PidkSVq2_n1F7Jn3uIcEMSXHSw0evHpAjaGydVzbUQCmgbWaCETZBWMPlKj29nxBDaHj_edkAiu12JhdkYDg61JGvE_s2nR8gyuBuiJZuDJTyQ7eE-IEOzog1YD80Lb0APLfdYc5F9qnFxjiKWwbImo6_llKRQVs-2u91c_bD2OCJLkT3JZasw7KLA2XCX31qKWE6vIzNk1fKE0XbmYrBTufiI8-_8D2cUWBA_AQAA)):
68

79
```svelte
@@ -40,5 +42,3 @@ A convenient way to find the origin of some change is to pass `console.trace` to
4042
// @errors: 2304
4143
$inspect(stuff).with(console.trace);
4244
```
43-
44-
> [!NOTE] `$inspect` only works during development. In a production build it becomes a noop.

0 commit comments

Comments
 (0)