You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: usehooks.com/src/content/hooks/useScript.mdx
+2-3
Original file line number
Diff line number
Diff line change
@@ -17,8 +17,7 @@ import StaticCodeContainer from "../../components/StaticCodeContainer.astro";
17
17
scripts into a React component. It manages the loading and status of the
18
18
script, allowing you to conditionally render components or perform actions
19
19
based on whether the script has been successfully loaded or encountered an
20
-
error. The hook keeps track of the script’s status, such as "loading,"
21
-
"ready," or "error," and provides this status as a return value. Additionally,
20
+
error. The hook keeps track of the script’s status and provides this status as a return value. Additionally,
22
21
it offers options to remove the script when the component is unmounted,
23
22
ensuring proper cleanup.
24
23
</HookDescription>
@@ -38,7 +37,7 @@ import StaticCodeContainer from "../../components/StaticCodeContainer.astro";
38
37
<divclass="table-container">
39
38
| Name | Type | Description |
40
39
| ------ | ------ | ----------- |
41
-
| status | string | This represents the status of the script load. Possible values are: `loading`, `ready`, and `error`.|
40
+
| status | string | This represents the status of the script load, `loading`, `ready`, `error`, or `unknown`. An `unknown` script is one that previously exists in the document, but was not added via `useScript`. |
0 commit comments