refract-redux-callbag
Advanced tools
Comparing version 1.1.0 to 1.2.0
@@ -30,5 +30,3 @@ import $$observable from 'symbol-observable'; | ||
var pipe = require('callbag-pipe'); | ||
var startWith = require('callbag-start-with'); | ||
var observeFactory = function (store) { | ||
var storeObservable = fromObs(store); | ||
return function (actionOrSelector) { | ||
@@ -48,4 +46,3 @@ if (typeof actionOrSelector === 'string') { | ||
if (typeof actionOrSelector === 'function') { | ||
var initialValue = actionOrSelector(store.getState()); | ||
return pipe(storeObservable, map(actionOrSelector), startWith(initialValue), dropRepeats()); | ||
return pipe(fromObs(store), map(actionOrSelector), dropRepeats()); | ||
} | ||
@@ -52,0 +49,0 @@ var _a; |
@@ -36,5 +36,3 @@ 'use strict'; | ||
var pipe = require('callbag-pipe'); | ||
var startWith = require('callbag-start-with'); | ||
var observeFactory = function (store) { | ||
var storeObservable = fromObs(store); | ||
return function (actionOrSelector) { | ||
@@ -54,4 +52,3 @@ if (typeof actionOrSelector === 'string') { | ||
if (typeof actionOrSelector === 'function') { | ||
var initialValue = actionOrSelector(store.getState()); | ||
return pipe(storeObservable, map(actionOrSelector), startWith(initialValue), dropRepeats()); | ||
return pipe(fromObs(store), map(actionOrSelector), dropRepeats()); | ||
} | ||
@@ -58,0 +55,0 @@ var _a; |
{ | ||
"name": "refract-redux-callbag", | ||
"description": "Refract bindings for Redux with Callbag: master your app effects reactively!", | ||
"version": "1.1.0", | ||
"description": "Refract bindings for Redux with Callbag: harness the power of reactive programming to supercharge your components!", | ||
"version": "1.2.0", | ||
"main": "index.js", | ||
@@ -12,3 +12,3 @@ "jsnext:main": "index.es.js", | ||
"peerDependencies": { | ||
"redux": ">= 3.0.0 < 5.0.0" | ||
"redux": ">= 3.5.0 < 5.0.0" | ||
}, | ||
@@ -21,3 +21,2 @@ "dependencies": { | ||
"callbag-pipe": "~1.1.1", | ||
"callbag-start-with": "~3.1.0", | ||
"symbol-observable": "~1.2.0" | ||
@@ -24,0 +23,0 @@ }, |
@@ -6,4 +6,4 @@ <p align="center"> | ||
<p align="center"> | ||
Master your React and Redux app's effects through the<br/> | ||
power of reactive programming. | ||
Harness the power of reactive programming<br/> | ||
to supercharge your components | ||
</p> | ||
@@ -31,6 +31,20 @@ <br/> | ||
Refract lets you isolate your app's side effects - API calls, analytics, logging, etc - so that you can write your code in a clear, pure, and declarative fashion by using reactive programming. | ||
* :bowling: **Decentralised**: attach effects and side-effects to your components, for better code splitting results | ||
* :sunrise: **Gradual**: use on an existing component today, throughout your app tomorrow | ||
* :rocket: **Reactive**: leverage the power and benefits of reactive programming | ||
* :floppy_disk: **Tiny**: less than 2Kb minified and gzipped | ||
* :pencil: **Typed**: written in TypeScript, fully typed integrations | ||
* :zap: **Universal**: supports React, React Native, Inferno and Preact | ||
Refract is an extensible library built for React, with bindings available for Inferno and Preact. In addition we provide a Redux integration, which can also serve as a template for integrations with other libraries. | ||
Refract lets you handle your component effects and side-effects, so that you can write your code in a clear, pure, and declarative fashion by using reactive programming. | ||
Refract makes reactive programming possible in React, React Native, Preact and Inferno, with only a single higher-order component! You can choose to start using a tiny bit of reactive programming, or go full reactive. Refract allows you to: | ||
* [Manage side effects](https://refract.js.org/) like API calls, analytics, logging, etc. | ||
* [Manipulate, replace and inject props](https://refract.js.org/usage/pushing-props), you can even [fully replace Redux `connect` HoC](https://refract.js.org/recipes/replace-connect) | ||
* [Handle state](https://refract.js.org/recipes/handling-state) | ||
* [Render components](https://refract.js.org/usage/rendering-components) | ||
We also provide a Redux integration, which can serve as a template for integrations with other libraries. With a single HoC, you can fully replace libraries like [recompose](https://github.com/acdlite/recompose), [redux-observable](https://redux-observable.js.org/), and [react-redux](https://github.com/reduxjs/react-redux) to name a few! | ||
# Why? | ||
@@ -40,8 +54,6 @@ | ||
However, our apps don't exist in a vacuum! They need to make network requests, handle data persistence, log analytics, deal with changing time, and so on. Any non-trivial app has to handle any number of these external effects. | ||
However, our apps don't exist in a vacuum! They need to handle state, make network requests, handle data persistence, log analytics, deal with changing time, and so on. Any non-trivial app has to handle any number of these effects. Wouldn't it be nice to cleanly separate them from our apps? | ||
These side-effects hold us back from writing fully declarative code. Wouldn't it be nice to cleanly separate them from our apps? | ||
Refract solves this problem for you, by harnessing the power of reactive programming. [For an in-depth introduction, head to `Why Refract`.](./docs/introduction/why-refract.md) | ||
Refract solves this problem for you. [For an in-depth introduction, head to `Why Refract`.](../../docs/introduction/why-refract.md) | ||
# Installation | ||
@@ -48,0 +60,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
16328
7
131
202
- Removedcallbag-start-with@~3.1.0
- Removedcallbag-start-with@3.1.0(transitive)