Skip to content

Commit 15f7006

Browse files
committed
Merge branch 'next' into fix/3892-loading-latest-shared-source
2 parents d1143ae + 4afc662 commit 15f7006

52 files changed

Lines changed: 2268 additions & 669 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"solid-js": patch
3+
"@solidjs/web": patch
4+
---
5+
6+
Move `dynamicComponent` into `solid-js`. `@solidjs/web` keeps `dynamic` and re-exports `dynamicComponent`.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"solid-js": patch
3+
---
4+
5+
Keep an SSR Errored fallback's hydration ids when its children slot is retried.

‎.changeset/lazy-module.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"solid-js": patch
3+
"@solidjs/compiler": patch
4+
---
5+
6+
Add `lazyModule()` so a lazy module that is not a component can be preloaded and hydrated by module id.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@solidjs/web": patch
3+
---
4+
5+
Frames (document adoption): gather an adopted boundary's hydration keys once per adoption, not once per occurrence. Each adopted occurrence's claim window used to select `[_hk^="<prefix>"]` over the whole hydration root — 37 ms on a 652-occurrence comment thread, more than the rest of its hydration. The boundary now indexes the `_hk` nodes under its element once (bucketed by occurrence prefix) and serves every window — the occurrence's and a streamed `<Loading>`'s resume inside it — from that index; a fragment revealed into the element later extends the index for the revealed parent, so late (post-done) claims still find their nodes. The page-level gather and the streamed boundary's resume path are unchanged.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@solidjs/signals": patch
3+
---
4+
5+
Awaited refresh of an optimistic accessor returns the source answer, not the caller's override.

‎documentation/server-components/server-components-principles.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2156,6 +2156,7 @@ const toggleAll = action(function* (ids: string[], completed: boolean) {
21562156
yield toggleAllTodos(ids, completed);
21572157
});
21582158

2159+
// `dynamicComponent` is imported from `solid-js`.
21592160
const Todos = dynamicComponent(() => getTodos(filter()));
21602161

21612162
<Todos

‎documentation/server-components/server-components.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ component-only form of `dynamic`, the same utility you'd use to swap any
135135
component — is the whole surface:
136136

137137
```tsx
138-
import { dynamicComponent } from "@solidjs/web";
138+
import { dynamicComponent } from "solid-js";
139139

140140
function StoryPage(props) {
141141
const [collapsedAll, setCollapsedAll] = createSignal(false);

‎documentation/solid-2.0/03-control-flow.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ const Article = dynamic(() => loadArticle(params.id), { deferStream: true });
228228
#### Notes
229229

230230
- The source evaluation is shared across all mounted instances of the returned component, so using one `dynamic(...)` in many places doesn't duplicate work.
231-
- Because a source may answer with a tag name, one `dynamic` on a page retains the element runtime (`spread`, the attribute helpers, the namespace tables) for everyone; `dynamicComponent(source)` is the same primitive for a source that only ever answers with a component — a server component mount ([RFC 11](11-server-components.md#using-one)) — and never does.
231+
- Because a source may answer with a tag name, one `dynamic` on a page retains the element runtime (`spread`, the attribute helpers, the namespace tables) for everyone; `dynamicComponent(source)` from `solid-js` is the same primitive for a source that only ever answers with a component — a server component mount ([RFC 11](11-server-components.md#using-one)) — and never does. `@solidjs/web` re-exports it.
232232

233233
### Client-only components: `clientOnly`
234234

‎documentation/solid-2.0/10-server-functions.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,7 @@ export const feed = live(
245245
);
246246

247247
// client
248+
import { dynamicComponent } from "solid-js";
248249
const Feed = dynamicComponent(() => feed(props.room));
249250
```
250251

‎documentation/solid-2.0/11-server-components.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,8 @@ async function getStory(id: number) {
101101
### Using one
102102

103103
```tsx
104+
import { dynamicComponent } from "solid-js";
105+
104106
function StoryPage(props) {
105107
const Story = dynamicComponent(() => getStory(props.storyId));
106108
return (

0 commit comments

Comments
 (0)