banderror / vuex-toolkit Goto Github PK
View Code? Open in Web Editor NEWAn alternative TypeScript-friendly API for Vuex.
License: MIT License
An alternative TypeScript-friendly API for Vuex.
License: MIT License
Support passing options to vuex-toolkit so the user could redefine some default values or behaviour:
Simplify internal type system of vuex-toolkit.
"Variadic tuple types" announced in TypeScript 4.0 can help with that, particularly with typing selectors and getters.
Support specifying a single handler for multiple mutations or actions.
Example:
handle.mutation([reset, submitted], state => {
state.isPending = false;
});
handle.action([a, b], () => {
//...
});
Create a proper .tsconfig
. Fix Object.entries
compiler error.
Set up TS linting with ESLint and (likely) Prettier.
Add proper type declarations.
See https://www.typescriptlang.org/docs/handbook/declaration-files/introduction.html
Implement module composition to simplify combining modules into hierarchies and/or root module.
Extend ActionContext
in a backward-compatible way. Users of vuex
should be able to use normal vuex actions with vuex-toolkit without the need to do any modifications to them.
send
and put
(or maybe send
and resolve
) methods to commit mutations, dispatch actions and send bypass messages -- all in both sync and async ways. Naming to be decided.get
method to call getters in a typed way.Decouple vuex-toolkit from sagas. Implement vuex saga plugin as a vuex-toolkit-saga
"extension" - a separate package.
Create an extended Store interface. Something like
interface VuexToolkitStore<S> extends Store<S> {
run: RunSaga;
send: SendMessage;
}
Create 2 versions of the send()
method (maybe send
and put
, or send
and resolve
- naming to be decided). One should be synchronous and return void
, the other one should be async and return a Promise
. Both should work with all kinds of messages that vuex-toolkit supports.
It should be possible to map bypass messages (those that are not actions or mutations) to "interfaces" created with VuexToolkit.interface()
.
Implement getter composition to simplify writing getters dependent on other getters.
Something similar to reselect
.
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.