Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

is this supposed to work alongside redux? #35

Open
rhyek opened this issue Sep 10, 2018 · 0 comments
Open

is this supposed to work alongside redux? #35

rhyek opened this issue Sep 10, 2018 · 0 comments

Comments

@rhyek
Copy link

rhyek commented Sep 10, 2018

I have an electron app using this boilerplate https://github.com/iRath96/electron-react-typescript-boilerplate, which already has redux configured in it. I am leaving it in just for connected-react-router. All my other state is using MobX. I am not using MST, currently.

This is my code:

import { observable } from 'mobx';
import remotedev from '@hlhr202/mobx-remotedev';
import { wallets, WalletKey } from './wallets';
import BaseWallet from './wallets/coins/BaseWallet';

const _applicationState = observable({
  walletsLoaded: false,
  currentWalletKey: Object.keys(wallets)[0] as WalletKey,
  get currentWallet(): BaseWallet {
    return wallets[this.currentWalletKey];
  },
});

const applicationState: typeof _applicationState = remotedev(_applicationState, {
  name: 'applicationState',
  remote: false,
  global: true,
});

export default applicationState;

When I open the redux devtools in electron, the only instance I see is the main window one which contains the redux state. Not seeing any other instances.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant