Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 

Repository files navigation

DyteJs

Official state management library for DativeJs

npm install dativejs dytejs 
import Dative from 'dativejs';
import { defineStore, connect } from 'dytejs';



  var store = defineStore({
    state:{
     count: 0
    },
    actions:{
     increase(){
      this.count+=1
     }
   }
  })
     
  var app = new Dative({
    el: "#app",
    template: `

        <div>
        <h1>Testing dyte</h1>
        <p>Count: {{$store.count}}</p>
        <button on:click="counter()">Add #1</button>
        </div>
     `,
    use: [store],
    methods:{
      counter: function(){
       this.$store.dispatch('increase');
      }
    }
   })


connect()(app);

Releases

Packages

Used by

Contributors