smirzo / vuex-observable-plugin Goto Github PK
View Code? Open in Web Editor NEW👁️ Plugin that adapts the popular redux-observable middleware to Vuex.
Home Page: https://redux-observable.js.org/
License: MIT License
👁️ Plugin that adapts the popular redux-observable middleware to Vuex.
Home Page: https://redux-observable.js.org/
License: MIT License
Hi @smirzo,
Thanks for a great plugin! I'm struggling to make it work with module-based store, which I think is pretty common thing and is widely used as an approach for Vuex store architecture.
In the examples you are using strings in ofType
calls. When using store modules I would love to have something like:
ofType(actions.START_STREAMING_NUMBERS.type)
instead of providing a string manually, for example (taken general
is a store module name):
ofType('general/START_STREAMING_NUMBERS')
As far as I know those types are there out of the box when using Redux, but it's not the case for Vuex. Could you please advise, if it's even doable or there is no other way except mentioned above?
To make it at least not that ugly I'm using the following workaround (meh):
modules/general/index.js
export const moduleName = 'general';
modules/general/actions.js
import { moduleName } from './index';
const epicActionName = name => `${moduleName}/${name}`;
export const epicActionTypes = {
START_STREAMING_NUMBERS: epicActionName('START_STREAMING_NUMBERS'),
STOP_STREAMING_NUMBERS: epicActionName('STOP_STREAMING_NUMBERS'),
};
modules/general/epics.js
import { epicActionTypes } from './actions';
...
ofType(epicActionTypes.START_STREAMING_NUMBERS),
...
Many thanks in advance.
🚨 You need to enable Continuous Integration on Greenkeeper branches of this repository. 🚨
To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because it uses your CI build statuses to figure out when to notify you about breaking changes.
Since we didn’t receive a CI status on the greenkeeper/initial
branch, it’s possible that you don’t have CI set up yet. We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.
If you have already set up a CI for this repository, you might need to check how it’s configured. Make sure it is set to run on all new branches. If you don’t want it to run on absolutely every branch, you can whitelist branches starting with greenkeeper/
.
Once you have installed and configured CI on this repository correctly, you’ll need to re-trigger Greenkeeper’s initial pull request. To do this, please click the 'fix repo' button on account.greenkeeper.io.
Because of lack of '.d.ts'. I can't even do import this module in typescript.
Could you consider a plan for typescript supporting?
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.