Commit 79f2f15
authored
docs: rewrite Vue integration guide around markRaw pattern (#1689)
## Summary
- Replaces the `SpreadsheetProvider` class example with the idiomatic
`markRaw` pattern as the primary recommendation
- Reframes the SSR section: HyperFormula is SSR-safe by default,
`<ClientOnly>` is an optional optimization
- Adds a TypeScript tip with a plain JS note
- Tightens prose throughout (net -20 lines)
## Test plan
- [x] Review the rendered docs page for clarity and correctness
- [x] Verify all internal links resolve (`basic-operations.md`,
`configuration-options.md`, etc.)
- [x] Confirm the Vue 3 StackBlitz demo link still works
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> **Low Risk**
> Documentation-only edits to integration guides; no application code,
auth, or data paths change.
>
> **Overview**
> Aligns the **Vue** and **React** integration guides around the same
TypeScript-first docs pattern and makes **`markRaw`** the primary Vue
integration story instead of a separate provider class.
>
> **Vue (`integration-with-vue.md`):** Drops the `SpreadsheetProvider`
wrapper and `spreadsheet-provider.ts` example in favor of a single
`<script setup>` sample that builds `HyperFormula` inside **`markRaw`**,
keeps sheet output in a `ref`, and calls **`destroy()`** on unmount.
Template buttons gain **disabled** states tied to whether results are
shown. Copy explains that only `values` is reactive and points mutators
at **Basic operations**. The **Nuxt/SSR** section is shortened:
HyperFormula is fine on the server; **`<ClientOnly>`** is framed as an
optional way to skip server work, not a requirement. Troubleshooting
keeps the same `licenseKeyValidityState` error but uses consistent
`markRaw` snippets (including `hf` naming).
>
> **React (`integration-with-react.md`):** Adds the same **::: tip
TypeScript** block (remove annotations for plain JS) and removes the
redundant standalone “drop type annotations” paragraph after the
example.
>
> No runtime or API changes—docs and examples only.
>
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
650eb19. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->1 parent 0e047ee commit 79f2f15
2 files changed
Lines changed: 35 additions & 53 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
7 | 11 | | |
8 | 12 | | |
9 | 13 | | |
| |||
67 | 71 | | |
68 | 72 | | |
69 | 73 | | |
70 | | - | |
71 | | - | |
72 | 74 | | |
73 | 75 | | |
74 | 76 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | | - | |
9 | | - | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
10 | 10 | | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
| 11 | + | |
38 | 12 | | |
39 | | - | |
| 13 | + | |
40 | 14 | | |
41 | 15 | | |
42 | 16 | | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
51 | 29 | | |
52 | 30 | | |
53 | 31 | | |
54 | 32 | | |
55 | | - | |
| 33 | + | |
56 | 34 | | |
57 | 35 | | |
58 | 36 | | |
59 | 37 | | |
60 | 38 | | |
61 | 39 | | |
62 | | - | |
| 40 | + | |
63 | 41 | | |
64 | 42 | | |
65 | 43 | | |
66 | | - | |
67 | | - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
68 | 48 | | |
69 | 49 | | |
70 | 50 | | |
| |||
73 | 53 | | |
74 | 54 | | |
75 | 55 | | |
76 | | - | |
| 56 | + | |
77 | 57 | | |
78 | 58 | | |
79 | 59 | | |
80 | | - | |
| 60 | + | |
81 | 61 | | |
82 | 62 | | |
83 | 63 | | |
| |||
89 | 69 | | |
90 | 70 | | |
91 | 71 | | |
92 | | - | |
| 72 | + | |
93 | 73 | | |
94 | 74 | | |
95 | | - | |
96 | | - | |
| 75 | + | |
| 76 | + | |
97 | 77 | | |
98 | | - | |
| 78 | + | |
99 | 79 | | |
100 | | - | |
101 | | - | |
| 80 | + | |
| 81 | + | |
102 | 82 | | |
103 | 83 | | |
104 | 84 | | |
| |||
0 commit comments