All Projects → zalmoxisus → Mobx Remotedev

zalmoxisus / Mobx Remotedev

Licence: mit
MobX DevTools extension

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Mobx Remotedev

mobx-react-form-devtools
DevTools for MobX React Form
Stars: ✭ 30 (-90.54%)
Mutual labels:  mobx, devtools
K3sup
bootstrap Kubernetes with k3s over SSH < 1 min 🚀
Stars: ✭ 4,012 (+1165.62%)
Mutual labels:  devtools
kami
🍰 Kami is mx-space's web frontend theme. Cute and lovely.
Stars: ✭ 92 (-70.98%)
Mutual labels:  mobx
Sketch Dev Tools
See your plugin logs, inspect the state of Sketch documents, explore actions, and more!
Stars: ✭ 285 (-10.09%)
Mutual labels:  devtools
BootstraPHP
A Bootstrap wrapper for PHP
Stars: ✭ 24 (-92.43%)
Mutual labels:  devtools
React Native Firebase Starter
The ultimate React Native starter using Firebase, Mobx, CodePush, OneSignal made with ♥
Stars: ✭ 289 (-8.83%)
Mutual labels:  mobx
chrome-ext-save-css
Chrome extension to automatically save changes in CSS and JS into local disk.
Stars: ✭ 27 (-91.48%)
Mutual labels:  devtools
Coderplanets web
the most sexiest community for developers, build with React, Mobx/MST, GraphQL, Styled-Components, Rxjs, Ramda ... and ❤️
Stars: ✭ 314 (-0.95%)
Mutual labels:  mobx
React Native Fruitstore
用react-native+mobx开发一个简单的迷你水果商城,支持ios和android。Use react-native + mobx to develop a simple mini fruit mall that supports ios and android.
Stars: ✭ 298 (-5.99%)
Mutual labels:  mobx
Deepkit Ml
The collaborative real-time open-source machine learning devtool and training suite: Experiment execution, tracking, and debugging. With server and project management tools.
Stars: ✭ 286 (-9.78%)
Mutual labels:  devtools
Mobx Keystone
A MobX powered state management solution based on data trees with first class support for Typescript, support for snapshots, patches and much more
Stars: ✭ 284 (-10.41%)
Mutual labels:  mobx
Log
Console.log with style.
Stars: ✭ 2,766 (+772.56%)
Mutual labels:  devtools
React Coat
Structured React + Redux with Typescript and support for isomorphic rendering beautifully(SSR)
Stars: ✭ 290 (-8.52%)
Mutual labels:  mobx
react-pits
React 中的坑
Stars: ✭ 29 (-90.85%)
Mutual labels:  mobx
Rawkit
🦊 Immediately Open Chrome DevTools when debugging Node.js apps
Stars: ✭ 306 (-3.47%)
Mutual labels:  devtools
myke
make with yaml: development tasks made simple with golang, yaml and many ingredients
Stars: ✭ 67 (-78.86%)
Mutual labels:  devtools
Usm
🏖 A concise & flexible state model for Redux/MobX/Vuex, etc.
Stars: ✭ 270 (-14.83%)
Mutual labels:  mobx
Ts React Webpack
a starter-template with typescript, react, mobx and webpack...
Stars: ✭ 287 (-9.46%)
Mutual labels:  mobx
Frontendwingman
Frontend Wingman, Learn frontend faster!
Stars: ✭ 315 (-0.63%)
Mutual labels:  devtools
Magento2 Developer Quickdevbar
Developer Toolbar for Magento2
Stars: ✭ 306 (-3.47%)
Mutual labels:  devtools

Mentioned in Awesome Mobx

Remote debugging for MobX with Redux DevTools extension (and remotedev coming soon)

Demo

Installation

1. Get the extension

1.1 For Chrome
1.2 For Firefox
1.3 For Electron
1.4 For other browsers, for React Native, hybrid, desktop and server side apps
  • Use remotedev.io or if you have the extension select Remote DevTools from the context menu. Just specify remote parameter, and optionally hostname and port. See the API for details.

2. Install the library

npm install --save mobx-remotedev

Usage

import remotedev from 'mobx-remotedev';
// or import remotedev from 'mobx-remotedev/lib/dev'
// in case you want to use it in production or don't have process.env.NODE_ENV === 'development'

const appStore = observable({
  // ...
});

// Or
class appStore {
  // ...
}

export default remotedev(appStore);

Or as ES decorator:

import remotedev from 'mobx-remotedev';

@remotedev(/*{ config }*/)
export default class appStore {
  // ...
}

See counter, simple-todo and todomvc examples.

API

remotedev(store, [config])

  • arguments
    • store observable or class to be monitored. In case you want to change its values (to time travel or cancel actions), you should export its result as in the example above (so we can extend the class).
    • config object (optional as the parameters bellow)
      • name string - the instance name to be showed on the monitor page. Default value is document.title.
      • onlyActions boolean - set it to true to have a clear log only with actions. If MobX is in strict mode, it is true by default. Don't forget about async actions.
      • global boolean - set it to true in order to assign dispatching of all unhandled actions to this store. Useful for nested classes / observables or when having async actions without specifying the scope explicitly.
      • filters object - map of arrays named whitelist or blacklist to filter action types. You can also set it globally in the extension settings.
        • blacklist array of (regex as string) - actions to be hidden in DevTools.
        • whitelist array of (regex as string) - all other actions will be hidden in DevTools (the blacklist parameter will be ignored).
      • remote boolean - set it to true to have remote monitoring via the local or remotedev.io server. remote: false is used for the extension or react-native-debugger
      • hostname string - use to specify host for remotedev-server. If port is specified, default value is localhost.
      • port number - use to specify host's port for remotedev-server.

Also see the extension API and my presentation at React Europe.

Exclude / include DevTools in production builds

By default use

import remotedev from 'mobx-remotedev';

It will work only when process.env.NODE_ENV === 'development', otherwise the code will be stripped.

In case you want to use it in production or cannot set process.env.NODE_ENV, use

import remotedev from 'mobx-remotedev/lib/dev';

So, the code will not be stripped from production bundle and you can use the extension even in production. It wouldn't affect the performance for end-users who don't have the extension installed.

FAQ

How to monitor (show changes) for inner items

Use remotedev function for them as well. Example

How to set data correctly when time traveling

By default it will try to set the properties of the class or observable object, but, if you have an importState method, it will be used. Example

How to disable computations when time traveling

Check __isRemotedevAction of your class or observable object, which will be set to true when it's a monitor action. Example

How to handle async actions

Use runInAction and don't forget about the second / third parameter which will be this if you're using arrow functions. If you don't want to specify it, set the global parameter to true. Example

How to show actions for nested classes / observables

Just set the global parameter to true like remotedev(store, { global: true }). If you want more details about the nested tree, see #5.

LICENSE

MIT

Created By

If you like this, follow @mdiordiev on twitter.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].