New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

reinbox

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

reinbox

Declarative topic based notification UI manager for React (Native)

latest
Source
npmnpm
Version
0.1.1
Version published
Weekly downloads
9
Maintainers
1
Weekly downloads
 
Created
Source

reinbox

npm license CircleCI codecov

Declarative topic based notification UI manager for React (Native).
If you want to use reinbox with Redux, you can use reinbox-redux.

Install

npm install reinbox

Usage

import { Provider, Inbox, withPublish } from "reinbox";

const TOPIC = "test";

const Button = ({ publish }) => (
  <button onClick={() => publish(TOPIC, { id: "xxx", message: "notify me" })}>
    notify
  </button>
);
const PublishButton = withPublish(Button);

const App = () => (
  <Provider>
    <div>
      <PublishButton />
    </div>
    <Inbox topic={TOPIC}>
      {({ payload, dismiss }) =>
        payload && (
          <div>
            <span>{payload.message}</span>
            <button onClick={dismiss}>dismiss</button>
          </div>
        )
      }
    </Inbox>
  </Provider>
);

API

<Inbox />

<Inbox topic="test">
  {({ payload, dismiss }) =>
    payload && (
      <div>
        <span>{payload.message}</span>
        <button onClick={dismiss}>dismiss</button>
      </div>
    )
  }
</Inbox>
prop namerequireddescription
topicYesTopic name you want to receive message
childrennYesRender notification message.
When there is no message, payload is null

Development

git clone git@github.com:Leko/reinbox.git
cd reinbox
npm i
npx lerna bootstrap

License

This package under MIT license.

Keywords

react

FAQs

Package last updated on 24 Sep 2018

Did you know?

Socket

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.

Install

Related posts