New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@ricardo-ch/native-redux-component

Package Overview
Dependencies
Maintainers
2
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ricardo-ch/native-redux-component

Redux native component provides a base component to watch your store and trigger rendering method without using react.

  • 1.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
11
increased by175%
Maintainers
2
Weekly downloads
 
Created
Source

npm version

native-redux-component

Want to use redux without using react ? Redux Component is a native implementation of react component which permits to watch your state and trigger render() method of your child component whenever it changes.

It also has the ability to render only when parts of the state change.

And cherry on the cake, the code is build with the universal module definition

Features

  • Watch all state change and trigger render()
  • Render only when properties paths change
  • Keep up to date for properties paths without rendering

Install

npm install @ricardo-ch/native-redux-component

Usage

Create a component listening and rendering a specific part of your app:

class MyComponent extends ReduxComponent {
  constructor(store) {
    super(store, ['todos'])
  }

  render() {
    // triggered each time 'todos' property of the state change
    ...

    // if needed dispatch a new change
    this.dispatch(myAction(value))
  }
}

Demo

A simple app to create toto tasks has been created in this repository. To use it, simply open demo/src/index.htmlin your favorite browser.

License

native-redux-component is licensed under the MIT license. (http://opensource.org/licenses/MIT)

Keywords

FAQs

Package last updated on 29 Aug 2017

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