Giter Club home page Giter Club logo

tuex's Introduction

DEPRECATED in favor of vuse-rx

Tuex (beta)

A simpler Vuex alternative written in TypeScript.

Travis branch Codacy branch grade size size npm

(TypeScript + Vuex) - Complexity = Tuex

Tuex is a reactive centralized state management library for Vue.js. It takes heavy inspiration from the Flux pattern (especially Vuex).

The main goal of Tuex is to make state-management less complex for small-scale apps, while also keeping the state flexibile and scalabile.

npm install tuex --save
# or
https://unpkg.com/tuex
// imports or scripts
...
Vue.use(Tuex);

const TuexStore = new Tuex.Store({
  num: 0,

  increase(amount) {
    this.num += amount;
  }
});
...
// Vue component
...
  created() {
    this.$store.increase(10);
    console.log(this.$store.num);
    // => 10

    this.$store.num = -1;
    console.log(this.$store.num);
    // => -1
  }
...

tuex's People

Contributors

raiondesu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

kaskar2008

tuex's Issues

devtool support

nice project, especially given the enormous amount of Vuex boilerplate.
However, without devtool support, that's problematic.
Wondering how difficult it would be to support devtools?

strange err in dev

Hi, when testing dev branch i get some strange error:
node_modules\tuex\types\vue.d.ts
(2,24): error TS2307: Cannot find module 'store'.

and when i modify path there to ../src/store
i get

\node_modules\tuex\types\vue.d.ts

(6,6): error TS2403: Subsequent variable declarations must have the same type.  Variable '$store' must be of type 'Store<any>', but here has type 'Store<any>'.

on following line in browser:
Object.defineProperty(_vue.prototype.$store, 'state', desc(stateWrapper, 'state'));

right after creating
const txstore = new Tuex.Store({

using npm 5.5.1, ts 2.6.2, vue 2.5.2

compatibility with devtools?

Hi,
thanks for your project, it makes sense to use simple api. Did you think of maybe to make it vuex compatible in a sense that it would extend existing official vuex and mutations, actions would be backwards compatible with vue devtools vuex part also?

thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.