Wondering what’s next for npm?Check out our public roadmap! »

    flumpt-traveler

    0.0.2 • Public • Published

    flumpt-traveler

    Time travel middleware for mizchi/flumpt

    Usage

    Load traveler as middleware:

    import App from './components/App';
     
    import { traveler, bindApp } from 'flumpt-traveler';
     
    const app = new App({
      renderer,
      initialState,
      middlewares : [
        traveler,
      ],
    });
     
    bindApp(app);
     
    app.update(x => x);

    ...then add DebugPanel to your App:

    import * as React from 'react';
    import { Flux }   from 'flumpt';
    import Wrapper    from './Wrapper';
     
    import { DebugPanel } from 'flumpt-traveler';
     
    class App extends Flux {
     
      subscribe () { ... }
     
      render (state) {
        return (
          <div>
            <Wrapper {...state}/>
            <DebugPanel />
          </div>
        );
      }
     
    }
     
    export default App;

    LICENSE

    MIT

    Keywords

    Install

    npm i flumpt-traveler

    DownloadsWeekly Downloads

    3

    Version

    0.0.2

    License

    MIT

    Last publish

    Collaborators

    • avatar