How to use the mobx-devtools-mst.default function in mobx-devtools-mst

To help you get started, we’ve selected a few mobx-devtools-mst examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Temzasse / yak-chat / client / src / index.js View on Github external
import App from './App';
import registerServiceWorker from './registerServiceWorker';
import { createSocket, initSocket } from './services/websocket';
import initNotifications from './services/notifications';
import createStore from './store';
import config from './config';
import theme from './assets/theme.json';

const socket = createSocket();
const store = createStore({ socket }); // Inject dependencies

initNotifications();

if (!config.IS_PROD) {
  const makeInspectable = require('mobx-devtools-mst').default; // eslint-disable-line
  makeInspectable(store);
}

initSocket({ store }); // Attach event listeners and inject dependencies

ReactDOM.render(
  
    
      
    
  ,
  document.getElementById('root')
);

registerServiceWorker();
github wp-pwa / wp-pwa / core / client / index.js View on Github external
coreModules.forEach(mapModules);
  pkgModules.forEach(mapModules);

  // Create MST Stores
  const Stores = Store.props(storesProps);
  const { initialSelectedItem } = window['wp-pwa'];

  stores = Stores.create(window['wp-pwa'].initialState, {
    request,
    machine: 'server',
    ...envs,
    initialSelectedItem,
  });
  if (dev) {
    const makeInspectable = require('mobx-devtools-mst').default;
    makeInspectable(stores);
  }
  // Add both to window
  if (typeof window !== 'undefined') window.frontity = { stores, components };

  // Start all the client sagas.
  stores.clientStarted();

  // Initializes the beforeCSRs.
  Object.values(stores).forEach(({ beforeCsr }) => {
    if (beforeCsr) beforeCsr();
  });

  // Start App.
  render(App);

  // Inform that the client has been rendered.

mobx-devtools-mst

Allows debugging mobx-state-tree roots. See [mobx-devtools/README.md](https://github.com/mobxjs/mobx-devtools/blob/master/README.md#mobx-state-tree).

MIT
Latest version published 16 days ago

Package Health Score

81 / 100
Full package analysis

Popular mobx-devtools-mst functions