Replies: 3 comments 4 replies
-
I agree. The current state management is messy. In many cases, it does things twice unnecessary: 1. update the app state, 2. update the DB. This is designed badly and introduced a lot of bugs. Thanks for your time digging for a better solution. I'm ok with replacing redux. Does Dexie work well in electron? I'm a little concerned about the case where people delete and reinstall the app |
Beta Was this translation helpful? Give feedback.
-
I set up the issue for the first task: I think its best to only do the settingsDB at first:
|
Beta Was this translation helpful? Give feedback.
-
Some more resources about electron persistence https://livebook.manning.com/book/electron-in-action/chapter-12/8 |
Beta Was this translation helpful? Give feedback.
-
I know that many devs love redux, but every time i approach a project that uses it, i get seriously turned off.
@zxch3n how much do you love redux?
When I added the integration profiles for gitlab, i used dexie and the code is much less mysterious
onezoomin@7f2a0d8#diff-e08048882bb180d378ecac731666e52caaab5f29d8270b1240776a8fd0248fc7R180
connects to the indexDB directly with functional style:
onezoomin@7f2a0d8#diff-c3cd800e80ce1b4da8401d52b993f94bdedd2eec00fadcd7addc73bff5fada2fR25
react hooks for useLiveQuery are also super convenient:
onezoomin@7f2a0d8#diff-78148f22ef19662a9cd2cd536e1e55b23eff393dfbef4b62698e4aab9e1d91a4R244
I propose to at least convert the whole settings DB to dexie, so we can compare how things work out.
I also think that the current export import system could be easily adapted for migration.
I know this is a radical proposal, but it is a big step towards simplifying the code base towards a local-first / offline-first approach.
Curious to read some opinions...
Beta Was this translation helpful? Give feedback.
All reactions