5.1.0 • Published 2 years ago

@nteract/epics v5.1.0

Weekly downloads
2,934
License
BSD-3-Clause
Repository
github
Last release
2 years ago

@nteract/epics

This package contains a set of Redux-Observable epics for use in nteract applications.

Installation

$ yarn add @nteract/epics
$ npm install --save @nteract/epics

Usage

The example below shows how we can use the watchExecutionStateEpic to monitor the state of a recently launched kernel.

import { watchExecutionStateEpic } from "@nteract/epics";

export default () => {
  // Create a Observable for the successful launch of a
  // kernel.
  const action$ = ActionsObservable.of({
      type: actionTypes.LAUNCH_KERNEL_SUCCESSFUL,
      payload: {
        kernel: {
          channels: of({
            header: { msg_type: "status" },
            content: { execution_state: "idle" }
          })
        }
      }
    });
    // Monitor the Observable and update the
    // state of the kernel on our client appropriately.
    const obs = watchExecutionStateEpic(action$);
    obs.pipe(toArray()).subscribe(
      actions => {
        const types = actions.map(({ type }) => type);
        expect(types).toEqual([actionTypes.SET_EXECUTION_STATE]);
      },
      err => done.fail(err), // It should not error in the stream
      () => done()
    );
  });
}

Documentation

We're working on adding more documentation for this component. Stay tuned by watching this repository!

Support

If you experience an issue while using this package or have a feature request, please file an issue on the issue board and add the pkg:epics label.

License

BSD-3-Clause

5.1.0

2 years ago

5.0.11

3 years ago

5.0.10

3 years ago

5.0.9

3 years ago

5.0.8

3 years ago

5.0.7-alpha.0

3 years ago

5.0.8-alpha.0

3 years ago

5.0.6

3 years ago

5.0.5

3 years ago

5.0.4

4 years ago

5.0.3

4 years ago

5.0.2

4 years ago

5.0.1

4 years ago

5.0.0

4 years ago

4.0.9

4 years ago

4.0.8

4 years ago

4.0.8-alpha.0

4 years ago

4.0.7-alpha.0

4 years ago

4.0.6

4 years ago

4.0.6-alpha.0

4 years ago

4.0.5-alpha.0

4 years ago

4.0.4-alpha.0

4 years ago

4.0.3-alpha.0

4 years ago

4.0.2

4 years ago

4.0.2-alpha.0

4 years ago

4.0.1-alpha.0

4 years ago

4.0.0-alpha.0

4 years ago

3.0.0

4 years ago

3.0.0-alpha.0

4 years ago

2.10.3-alpha.0

4 years ago

2.10.2-alpha.0

4 years ago

2.10.1

4 years ago

2.10.1-alpha.0

4 years ago

2.10.0-alpha.0

4 years ago

2.9.0

4 years ago

2.8.0

4 years ago

2.7.4

5 years ago

2.7.3

5 years ago

2.7.2

5 years ago

2.7.1

5 years ago

2.7.0

5 years ago

2.6.2

5 years ago

2.6.1

5 years ago

2.6.0

5 years ago

2.5.2

5 years ago

2.5.1

5 years ago

2.5.0

5 years ago

2.4.0

5 years ago

2.3.0

5 years ago

2.2.0

5 years ago

2.1.3

5 years ago

2.1.2

5 years ago

2.1.1

5 years ago

2.1.0

5 years ago

2.0.1

5 years ago

2.0.0

5 years ago

1.0.4-alpha.0

5 years ago