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: README.md
+22-18Lines changed: 22 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -193,6 +193,8 @@ Control when each island mounts on the client:
193
193
|`'load'`| Mount immediately (via microtask). **Default.**|
194
194
|`'idle'`| Mount during idle time (`requestIdleCallback`, falls back to `setTimeout(…, 1)`) |
195
195
|`'visible'`| Mount when the host element enters the viewport (`IntersectionObserver` with configurable `rootMargin`, default `200px`) |
196
+
|`'hover'`| Mount on first `mouseover` or `focusin` on the host |
197
+
|`'event'`| Mount on configured host events (`event` option or `data-fict-react-event`; defaults to `click`) |
196
198
|`'only'`| Client-only rendering — no SSR, no hydration |
197
199
198
200
When `ssr` is `true` (the default), the React subtree is rendered to HTML on the server. On the client, the island hydrates (`hydrateRoot`) if SSR content is present, otherwise it creates a fresh root (`createRoot`).
@@ -205,13 +207,14 @@ Wraps a React component as a Fict component. Props flow reactively from the Fict
|`data-fict-react-event`| no | Comma-separated mount events for `client="event"`|
278
+
|`data-fict-react-ssr`| no |`'1'` if SSR content is present |
279
+
|`data-fict-react-prefix`| no | React `useId` identifier prefix |
280
+
|`data-fict-react-host`| — | Marks element as a React island host |
281
+
|`data-fict-react-mounted`| — | Set to `'1'` after the island mounts |
278
282
279
283
`*` Changing the QRL disposes the current root and creates a new one.
280
284
281
-
Immutable attributes (`data-fict-react-client`, `data-fict-react-ssr`, `data-fict-react-prefix`) emit a warning in development if mutated at runtime. To change them, recreate the host element.
285
+
Immutable attributes (`data-fict-react-client`, `data-fict-react-ssr`, `data-fict-react-prefix`, `data-fict-react-event`) emit a warning in development if mutated at runtime. To change them, recreate the host element.
0 commit comments