2.1.36 • Published 3 years ago

@mybinder/host-cache v2.1.36

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

@mybinder/host-cache

This package contains a provider component that allows you to connect to a Binder instance and access its context in all child components. To see this package in action, you can view the source for the nteract play application.

Installation

$ yarn add @nteract/host-cache
$ npm install --save @nteract/host-cache

Usage

The example below shows how we can use the Host component within this package to connect to a Binder instance and display information about the connection.

import { Host } from "@mybinder/host-cache";

export default () => {
  return (
    <Host
      repo="nteract/examples"
      gitRef="master"
      binderURL="https://mybinder.org"
    >
      <p>We've connected to a Binder instance within this context.</p>
      <p>
        But now we need to retrieve some information about the Binder context we
        are connected to.
      </p>
      <p>So let's use the "Host.Consumer" component!</p>
      <Host.Consumer>
        {host =>
          host ? (
            <pre>
              Endpoint: {host.endpoint}
              Token: {host.token}
            </pre>
          ) : null
        }
      </Host.Consumer>
    </Host>
  );
};

Documentation

You can view the reference documentation for @mybinder/host-cache in the component docs.

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:host-cache label.

License

BSD-3-Clause

2.1.36

3 years ago

2.1.35

3 years ago

2.1.34

3 years ago

2.1.33

3 years ago

2.1.33-alpha.0

3 years ago

2.1.32-alpha.0

3 years ago

2.1.31

3 years ago

2.1.30

3 years ago

2.1.29

4 years ago

2.1.28

4 years ago

2.1.27

4 years ago

2.1.26

4 years ago

2.1.25

4 years ago

2.1.24

4 years ago

2.1.23

4 years ago

2.1.23-alpha.0

4 years ago

2.1.22-alpha.0

4 years ago

2.1.21

4 years ago

2.1.21-alpha.0

4 years ago

2.1.20-alpha.0

4 years ago

2.1.19-alpha.0

4 years ago

2.1.18-alpha.0

4 years ago

2.1.17

4 years ago

2.1.17-alpha.0

4 years ago

2.1.16-alpha.0

4 years ago

2.1.15-alpha.0

4 years ago

2.1.14

4 years ago

2.1.14-alpha.0

4 years ago

2.1.13-alpha.0

4 years ago

2.1.12-alpha.0

4 years ago

2.1.11

4 years ago

2.1.11-alpha.0

4 years ago

2.1.10-alpha.0

4 years ago

2.1.9

4 years ago

2.1.8

4 years ago

2.1.7

5 years ago

2.1.6

5 years ago

2.1.5

5 years ago

2.1.4

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.7

5 years ago

2.0.6

5 years ago

2.0.5

5 years ago

2.0.4

5 years ago

2.0.3

5 years ago

2.0.2

5 years ago

2.0.1

5 years ago

2.0.0

5 years ago

1.0.4-alpha.0

5 years ago

1.0.3-alpha.0

5 years ago

1.0.2-alpha.0

5 years ago

1.0.0-alpha.0

6 years ago

0.2.5

6 years ago

0.2.3

6 years ago

0.2.2

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.0

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago