Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@airship/with-unstated

Package Overview
Dependencies
Maintainers
3
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@airship/with-unstated

HOC for Unstated state management

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
3
Created
Source

withUnstated

Higher Order Component for Unstated state management

Install

yarn add @airship/with-unstated

or

npm install @airship/with-unstated

Usage

You can use this HoC to wrap a component so that you can have access to the Unstated Containers in life-cycle methods.

import React, { Component } from 'react';

import { ContainerOne, ContainerTwo } from './containers';
import withUnstated from '@airship/with-unstated';

class MyComponent extends Component {
  componentDidMount() {
    this.props.containerOne.doSomething();
  }

  componentDidUpdate() {
    this.props.containerTwo.doSomethingElse();
  }

  // ...
}

export default withUnstated(MyComponent, {
  containerOne: ContainerOne,
  containerTwo: ContainerTwo
});

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/teamairship/with-unstated. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

This package is available as open source under the terms of the MIT License.

Keywords

FAQs

Package last updated on 18 Jan 2019

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc