Skip to content
vue renderer materializer for the tarant framework
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib
test
.gitignore
.npmignore
.prettierrc
.travis.yml
CODE_OF_CONDUCT.md
LICENSE
README.md
package-lock.json
package.json
rollup.config.js
tsconfig.json
tslint.json
upgrade.sh
yarn.lock

README.md

logomakr_3zswgm

npm Build Status Coverage Status PRs Welcome issues Welcome npm GitHub issues GitHub pull requests Downloads

Motivation

Provide the capabilities to actors to be render using the vue framework.

Installation

add it to your project using npm install tarant-vue --save or yarn add tarant-vue

Usage

Extend the vue actor with a template and the properties to bind to the id of the actor will relate to the html component id

import { VueActor } from "tarant-vue";

export default class AppActor extends VueActor {
    constructor() {
      super("#app")
      this.schedule(1000, this.incrementCounter, [])
    }
  
    private incrementCounter(): void {
      this.counter++;
    }

    private counter = 0; 
    readonly template : string = "<div>counter: {{counter}}</div>"
}

Initialize the actor system with the provided materializer

import { ActorSystem, ActorSystemConfigurationBuilder } from 'tarant'
import AppActor from './Actor/AppActor';
import { VueRenderer } from 'tarant-vue';

window.onload = () => {
  const system = ActorSystem.for(ActorSystemConfigurationBuilder.define()
  .withMaterializer(new VueRenderer())
  .done())  
  system.actorOf(AppActor)
}
Created my free logo at LogoMakr.com
You can’t perform that action at this time.