npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

mobx-delorean

v1.1.0

Published

MobX time travel debugger and visualization tool

Downloads

59

Readme

Delorean

An intuitive, in-app MobX + React developer tool employing time travel debugging and undo/redo actions. Quickly and easily gain insight into MobX-React projects, with just three lines of code.

Features

  • Flexible time travel functionality
  • Persistent log of every observable action and state change, including individual diffs and complete application state
  • Easy undo/redo of actions without unwanted side effects
  • Alternate timeline debugging. Reverse your application's state and branch into a new timeline with the option of returning to your original state.

Installation

NPM Module

Delorean is easily installed through npm as a developer dependency using your terminal.

npm install mobx-delorean --save-dev

Getting Started

Import DeloreanTools and delorean from the mobx-delorean module.

// in top level React component file
import { DeloreanTools } from 'mobx-delorean';

...

  render() {
    return (
      <div>
        <DeloreanTools />
        <YourComponent />
      <div>
    )
  }
// in MobX store files(s)
import { delorean } from 'mobx-delorean';

...

export default delorean(YourStore, [config]);

####config

  • arguments
    • name (string): the instance name to be shown in the toolbar
    • onlyActions (boolean): if true, Delorean will only track actions. Using MobX in strict mode causes a default to true
    • global (boolean): if true, Delorean will assign dispatching of unhandled actions to this global store
    • filters (object): whitelist or blacklist certain action types using an array of regular expressions as strings
      • whitelist any other actions will be ignored by Delorean
      • blacklist Delorean will ignore this action

Note: Delorean relies on wrapping your MobX store export in order to track its observables and parse its dependency tree at runtime. If you are using multiple stores, you can wrap them separately and Delorean will track them in a singular UI.

Open your MobX app in the browser and notice the Delorean toolbar at the top of your app. In order from left to right:

  1. Time Travel Slider - Click to toggle the time travel slider's visibility. Drag and drop the position marker to traverse through the log of previous application states.

  2. Undo/Redo Actions - Step forward and back through your application's state one action at a time with specific details about each change.

  3. Store Structure Visualizer - Open a new tab with a rich heirarchy visualization of your MobX store's dependency tree. (in development)