hex13 / feedbacks Goto Github PK
View Code? Open in Web Editor NEWFeedbacks - Redux extension for pattern-matching and side-effects
License: MIT License
Feedbacks - Redux extension for pattern-matching and side-effects
License: MIT License
because of method .next()
.
Line 19 in 22aeb98
How to detect generator?
checking if method next exists is not enough.
Checking if Symbol.iterator
exists if often not enough (arrays also have it).
I put link to this library on few places.
But this turned out to be not popular library (only 3 Github stars, zero issues from users).
I wonder if somebody uses it. If you do, feel free to tell me about "in what applications you use Feedbacks, how is your experience using Feedbacks, what features would you like to see in future versions etc."
If you don't use it. Why not? Is Readme not clear of "what Feedbacks are for?". Or are you reluctant to use not-popular library? Or maybe current popular solutions for Redux (Redux Thunk, Redux Saga, Redux-Observable etc.) are sufficient? Or from other reasons?
Well, not sure if this is written in clear way in README but main purposes of Feedbacks are:
Do you also think that problems above are worth solving? Or you don't really see them as a problem? Or maybe do you have other solution for them?
dispatching effects
array support
services
auto-(de)normalized store (with use of Transmutable library)
collection helpers (addItem, setItem etc.) should they be effects?
naming, api design
questions to ask:
add some additional effects (maybe we won't need all of it, just examples).
consider using generators as some kind of saga-like effect
polish the calendar example
revamp README, make it more clean.
fx.effect
(or other fx
methods), not by just returning a function wrapped promisedocumentation on Github pages with few interactive examples
integration with Redux dev tools
remove plain functions from effects if they are finished #3
steps to reproduce:
const store = createStore({
a: init(0).on('foo', () => () => 1)
}, createFeedbacks());
store.dispatch({type: 'foo'});
store.dispatch({type: 'foo'});
TypeError: eff.cancel is not a function
at visitNode (src/resmix.js:350:37)
at visitNode (src/resmix.js:367:29)
at Object.action [as dispatch] (src/resmix.js:371:17)
How it should work and why this bug occurs:
Feedbacks is designed to auto-cancel previous effect on same property.
e.g. () => new Observable(...) cancel previous observable bound to property.
But effects can be various things (including functions) and when a function is returned, Feedbacks somewhat wants to cancel previous function by calling result.cancel()
when result
is a result of running effect in EffectRunner
. But EffectRunner doesn't always return cancellable result.
So either it should cancel previous function or just checking if eff.cancel
exists in result.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.