@matreshka/bff 0.25.0 → 0.25.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -102,7 +102,8 @@ export declare class Client {
102
102
  */
103
103
  newMessage(messageString: string): void;
104
104
  /**
105
- * Переход на другую страницу: снимает обработчики с предыдущей страницы и запоминает id новой.
105
+ * Переход на другую страницу: запоминает id новой страницы.
106
+ * Предыдущий page instance снимается по interaction `leave` с клиента (см. EntryComponent.emitInteraction).
106
107
  */
107
108
  switchPage(newPageInstance: ComponentInstance<Page>): void;
108
109
  /**
@@ -195,13 +195,10 @@ class Client {
195
195
  }
196
196
  }
197
197
  /**
198
- * Переход на другую страницу: снимает обработчики с предыдущей страницы и запоминает id новой.
198
+ * Переход на другую страницу: запоминает id новой страницы.
199
+ * Предыдущий page instance снимается по interaction `leave` с клиента (см. EntryComponent.emitInteraction).
199
200
  */
200
201
  switchPage(newPageInstance) {
201
- // Вообще эта логика не обязательна, т.к. releaseInstances вызывается при получении leave interaction, это скорее защита от недобросовестных клиентов чтобы не копились лишние обработчики в памяти
202
- this.currentPageInstance?.component.releaseInstances([
203
- this.currentPageInstance,
204
- ]);
205
202
  this.currentPageInstance = newPageInstance;
206
203
  }
207
204
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@matreshka/bff",
3
- "version": "0.25.0",
3
+ "version": "0.25.1",
4
4
  "description": "Matreshka BFF: server-driven UI runtime — routing, pages, context, component DSL, and platform APIs",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",