spb-web / vuexok Goto Github PK
View Code? Open in Web Editor NEWHome Page: https://spb-web.github.io/vuexok/
Home Page: https://spb-web.github.io/vuexok/
Библиотека действительно удобная, только не хватает одной вещи для счастья - map функций, вроде mapState, mapGetters
Hi Vyacheslav,
thanks for the hint over at Vuex-Typescript, because I was just looking for the right Vuex modularization and typing package, so this must be the best "bujaka jaka jak"-surprise I coincidentally came by this year! 🥳🎉
It directly felt right, very right, and after implementing it (but see below), checking a few other solutions, and reconfirming myself how messy module management (rootThis, rootThat, ...) still becomes even with latest Vuex 4, I'm convinced that your way is what Vuex itself should be doing - perfect! 😻
But does it really already support Vue 3? 🤔
Because after transforming my store into Vuexok magic, and in frenetic expectations of a new level of store, all I could get from it was the following, which makes me guess I somehow missed the Vue 3 flag/option/package. 🙃
TypeError: Object is not a constructor (evaluating 'new Vue__default['default']()')
Tested it with plain Vue 3 CLI and Vite - same result.
Btw., what's the story to the name of Vuexok
, as maybe Vuexnov
could make you even more a well deserved legend! 😹💦
There might be several scenarios when you need to reuse some module as sub module with separate state? which is the best way?
There are two options in my mind:
use function to return singleton or new module and use it as separate module but not as sub-module
keep config in separate variable which breaks auto-completes inside this config, so probably there should be separate method to get config from module or specific type to use with plain object config variable
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.