Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@cerebral/vue

Package Overview
Dependencies
Maintainers
5
Versions
270
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cerebral/vue

Vue.js view for Cerebral

  • 3.0.0-1512546003971
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
52
decreased by-86.56%
Maintainers
5
Weekly downloads
 
Created
Source

@cerebral/vue

Vue.js view for Cerebral.

Install

npm install @cerebral/vue vue

Container

import Vue from 'vue/dist/vue'
import {Controller} from 'cerebral'
import {Container, connect} from '@cerebral/vue'

const controller = Controller({
  state: {
    foo: 'bar'
  },
  signals: {
    clicked: []
  }
})

 var app = new Vue({
  el: '#app',
  components: {
    container: Container(controller)
  }
})

Note! The HTML of the root element must use the container:

<div id="app">
  <container>
    <my-component></my-component>
  </container>
</div>

connect

MyComponent.js

import {connect} from '@cerebral/vue'
import {state, signal} from 'cerebral/tags'

export default connect({
  foo: state`foo`,
  click: signal`clicked`
}, {
  template: '<div v-on:click="click()">{{foo}}</div>'
})

main.js

import Vue from 'vue/dist/vue'
import {Controller} from 'cerebral'
import {Container, connect} from '@cerebral/vue'
import MyComponent from './MyComponent'

const controller = Controller({
  state: {
    foo: 'bar'
  },
  signals: {
    clicked: []
  }
})

 var app = new Vue({
  el: '#app',
  components: {
    container: Container(controller),
    'my-component': MyComponent
  }
})

FAQs

Package last updated on 06 Dec 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc