Extending rootStore and stores - platform agnostic #3628
Unanswered
zbouslikhin
asked this question in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I'm currently trying to port my existing application built using electron, React and MobX.
For that, I need to separate system calls such as
fs
etc...I came up with an architecture that looks like this ->
I'm also using MUI v5 to switch themes. With the current architecture, I have a function called
toggleIsDark
. The observable updates just fine, but not the theme (visually) and this only happens when I useRootDesktopStore
provider. When usingRootBaseStore
, the theme updates visually too.Would you consider this architecture of BaseStore <-> platformStore as a good practice?
I created a small codesandbox as a demo.
Beta Was this translation helpful? Give feedback.
All reactions