Socket
Socket
Sign inDemoInstall

focal-redux

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

focal-redux


Version published
Weekly downloads
4
increased by300%
Maintainers
1
Weekly downloads
 
Created
Source

Focal-Redux

npm Version License Build Status

Focal-Redux allows you to use all the power of Focal in a Redux application. It helps you to implement Focal's Atom in the Redux application by simplifying the code refactoring when you want to switch from Redux to Focal. Futhermore, you can use all the advantages of both state-management in your application. For example, Focal can help you with large collections of data or form management, and so on.

Installation

$ yarn add focal-redux

or

$ npm install --save focal-redux

Usage

First Step

You should wrap your Reducer or ReducersMapObject with subscribeAtom function. This function will automaticaly add action @@UPDATE_STORE@@ which will be dispatched when your atom updates.

import {subscribeStore} from 'focal-redux'

// Reducer:
subscribeAtom(reducer)

// ReducersMapObject
combineReducer(subscribeAtom({ //reducers }))
First Step

You should subscribe your atom to store using subscribeStore function:

subscribeStore(atom, store)

NPM scripts

  • npm start: Runs npm run build in watch mode
  • npm run test: Run test suite
  • npm run test:watch: Run test suite in interactive watch mode
  • npm run build: Generage bundles and typings
  • npm run lint: Lints code

Contributing

If you think that we are missing any key features, please open a GitHub issue, or even better, a pull request. Any feedback you have about using focal-redux would be greatly appreciated.

Keywords

FAQs

Package last updated on 02 Jul 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