From 82fcdfc2fa0321cd1014fe9e5c9d79b8454f2f15 Mon Sep 17 00:00:00 2001 From: Tan Li Hau Date: Tue, 5 Jan 2021 03:41:11 +0800 Subject: [PATCH] rework SSR store autosubscription (#5419) --- CHANGELOG.md | 4 + src/compiler/compile/render_dom/Renderer.ts | 53 +-------- src/compiler/compile/render_dom/invalidate.ts | 65 +++++++++- src/compiler/compile/render_ssr/index.ts | 112 ++++++++++++++---- .../_config.js | 1 - .../_config.js | 1 - .../_config.js | 1 - .../_config.js | 3 + .../main.svelte | 31 +++++ 9 files changed, 193 insertions(+), 78 deletions(-) create mode 100644 test/runtime/samples/store-auto-resubscribe-immediate/_config.js create mode 100644 test/runtime/samples/store-auto-resubscribe-immediate/main.svelte diff --git a/CHANGELOG.md b/CHANGELOG.md index 28121604d948..e77f65dea83c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Svelte changelog +## Unreleased + +* Rework SSR store handling to subscribe and unsubscribe as in DOM mode ([#3375](https://github.com/sveltejs/svelte/issues/3375), [#3582](https://github.com/sveltejs/svelte/issues/3582), [#3636](https://github.com/sveltejs/svelte/issues/3636)) + ## 3.31.1 * Fix scrolling of element with resize listener by making the `