Security News
Highlights from the 2024 Rails Community Survey
A record 2,709 developers participated in the 2024 Ruby on Rails Community Survey, revealing key tools, practices, and trends shaping the Rails ecosystem.
mobx-remotedev
Advanced tools
Remote debugging for MobX with Redux DevTools extension (and remotedev coming soon)
npm i & npm run build:extension
and load the extension's folder ./build/extension
npm i & npm start
and load the extension's folder ./dev
.npm i & npm run build:firefox
and load the extension's folder ./build/firefox
.REDUX_DEVTOOLS
in electron-devtools-installer
.npm install --save mobx-remotedev
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);
See counter and todomvc examples.
remotedev(store, [config])
true
to have a clear log only with actions. Usually you want to use it in strict mode. And don't forget about async actions.true
when having circular references or special types like ImmutableJS. By default is false
.whitelist
or blacklist
to filter action types. You can also set it globally in the extension settings.
blacklist
parameter will be ignored).Also see the extension API and my presentation at React Europe.
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.
Use remotedev
function for them as well. Example
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
Check __isRemotedevAction
of your class or observable object, which will be set to true when it's a monitor action. Example
Use runInAction
and don't forget about the second / third parameter which will be this
if you're using arrow functions. Example
If you like this, follow @mdiordiev on twitter.
FAQs
Remote debugging for mobx.
The npm package mobx-remotedev receives a total of 1,068 weekly downloads. As such, mobx-remotedev popularity was classified as popular.
We found that mobx-remotedev demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A record 2,709 developers participated in the 2024 Ruby on Rails Community Survey, revealing key tools, practices, and trends shaping the Rails ecosystem.
Security News
In 2023, data breaches surged 78% from zero-day and supply chain attacks, but developers are still buried under alerts that are unable to prevent these threats.
Security News
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.