|
1 | 1 | # @data-client/vue |
2 | 2 |
|
| 3 | +## 0.2.0-beta-20251026233651-4c1d5c9084df801287cc120cd7a9c77b9bbe96e0 |
| 4 | + |
| 5 | +### Minor Changes |
| 6 | + |
| 7 | +- [`733091f`](https://github.com/reactive/data-client/commit/733091f09b503ef7bb7d435a1d86dd7cbcfd96bb) Thanks [@ntucker](https://github.com/ntucker)! - Never wrap renderDataCompose().result in ref. Just passthrough the return value directly. Always. |
| 8 | + |
| 9 | + ### Before |
| 10 | + |
| 11 | + ```ts |
| 12 | + const { result, cleanup } = await renderDataCompose(() => |
| 13 | + useSuspense(CoolerArticleResource.get, { id: payload.id }), |
| 14 | + ); |
| 15 | + |
| 16 | + const articleRef = await result.value; |
| 17 | + expect(articleRef.value.title).toBe(payload.title); |
| 18 | + expect(articleRef.value.content).toBe(payload.content); |
| 19 | + ``` |
| 20 | + |
| 21 | + ### After |
| 22 | + |
| 23 | + ```ts |
| 24 | + const { result, cleanup } = await renderDataCompose(() => |
| 25 | + useSuspense(CoolerArticleResource.get, { id: payload.id }), |
| 26 | + ); |
| 27 | + |
| 28 | + const articleRef = await result; |
| 29 | + expect(articleRef.value.title).toBe(payload.title); |
| 30 | + expect(articleRef.value.content).toBe(payload.content); |
| 31 | + ``` |
| 32 | + |
| 33 | +- [#3591](https://github.com/reactive/data-client/pull/3591) [`aecd59b`](https://github.com/reactive/data-client/commit/aecd59becae7fb722eee4bd5035f2a654e75d5d8) Thanks [@ntucker](https://github.com/ntucker)! - `renderDataCompose()` awaits until the composable runs |
| 34 | + |
| 35 | + ### Before |
| 36 | + |
| 37 | + ```ts |
| 38 | + const { result, cleanup } = renderDataCompose(() => |
| 39 | + useCache(CoolerArticleResource.get, { id: payload.id }), |
| 40 | + ); |
| 41 | + |
| 42 | + // Wait for initial render |
| 43 | + await waitForNextUpdate(); |
| 44 | + |
| 45 | + expect(result.current).toBeDefined(); |
| 46 | + ``` |
| 47 | + |
| 48 | + ### After |
| 49 | + |
| 50 | + ```ts |
| 51 | + const { result, cleanup } = await renderDataCompose(() => |
| 52 | + useCache(CoolerArticleResource.get, { id: payload.id }), |
| 53 | + ); |
| 54 | + |
| 55 | + expect(result.value).toBeDefined(); |
| 56 | + ``` |
| 57 | + |
| 58 | +- [#3591](https://github.com/reactive/data-client/pull/3591) [`aecd59b`](https://github.com/reactive/data-client/commit/aecd59becae7fb722eee4bd5035f2a654e75d5d8) Thanks [@ntucker](https://github.com/ntucker)! - `renderDataCompose().result` is now simply passes the composable result if it's a ref, or wraps it as computable ref |
| 59 | + |
| 60 | +- [#3592](https://github.com/reactive/data-client/pull/3592) [`4c9465b`](https://github.com/reactive/data-client/commit/4c9465bdcb139d79ca7205925e93fc45d37f3281) Thanks [@ntucker](https://github.com/ntucker)! - Add useDLE() |
| 61 | + |
| 62 | + ```ts |
| 63 | + const { date, loading, error } = useDLE( |
| 64 | + CoolerArticleResource.get, |
| 65 | + computed(() => (props.id !== null ? { id: props.id } : null)), |
| 66 | + ); |
| 67 | + ``` |
| 68 | + |
| 69 | +### Patch Changes |
| 70 | + |
| 71 | +- [`d52fa38`](https://github.com/reactive/data-client/commit/d52fa38115950db8d3f3fde2d364c9f0ad8aaf65) Thanks [@ntucker](https://github.com/ntucker)! - Fixed race condition in useSuspense() where args change while initial suspense is not complete |
| 72 | + |
| 73 | +- [`eae4fe4`](https://github.com/reactive/data-client/commit/eae4fe4004ff506a020fac0ca7b322d7eda0aac2) Thanks [@ntucker](https://github.com/ntucker)! - renderDataClient -> renderDataCompose |
| 74 | + |
| 75 | + This keeps naming conventions closer to the React version |
| 76 | + |
3 | 77 | ## 0.2.0-beta-20251026024409-a1c466cfd7aac770879b584acaac40fa61d01b61 |
4 | 78 |
|
5 | 79 | ### Patch Changes |
|
0 commit comments