From 950fb9be8061e2a26e0536b98c6a3ee230618f54 Mon Sep 17 00:00:00 2001 From: Kristóf Marussy Date: Thu, 23 Dec 2021 13:40:47 +0100 Subject: feat: Main to renderer store synchronization Patches are send in one direction only, from the main to the renderer, so all actions have to go through the context bridge and the renderer IPC to modify the store in the renderer. This makes the store in the main process a single source of truth, which simplifies debugging and state persistence. The store in the renderer is connected to redux devtools for inspection, but playing back the state in the devtools won't change the sotre in main process. --- packages/preload/package.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'packages/preload/package.json') diff --git a/packages/preload/package.json b/packages/preload/package.json index 5556c10..2ad215c 100644 --- a/packages/preload/package.json +++ b/packages/preload/package.json @@ -10,7 +10,9 @@ }, "dependencies": { "@sophie/shared": "workspace:*", - "electron": "^16.0.5" + "electron": "^16.0.5", + "mobx": "^6.3.10", + "mobx-state-tree": "^5.1.0" }, "devDependencies": { "typescript": "^4.5.4", -- cgit v1.2.3-54-g00ecf