Security News
cURL Project and Go Security Teams Reject CVSS as Broken
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
@logux/vuex
Advanced tools
Logux is a new way to connect client and server. Instead of sending HTTP requests (e.g., AJAX and GraphQL) it synchronizes log of operations between client, server, and other clients.
This repository contains Vuex compatible API on top of Logux Client.
npm install @logux/vuex vuex
or
yarn add @logux/vuex vuex
See documentation for Logux API.
import Vue from 'vue'
import { LoguxVuex, createLogux } from '@logux/vuex'
Vue.use(LoguxVuex)
const Logux = createLogux({
subprotocol: '1.0.0',
server: process.env.NODE_ENV === 'development'
? 'ws://localhost:31337'
: 'wss://logux.example.com',
userId: 'anonymous',
token: ''
})
const store = new Logux.Store({
state: {},
mutations: {},
actions: {},
modules: {}
})
store.client.start()
export default store
<template>
<div v-if="isSubscribing">
<h1>Loading</h1>
</div>
<div v-else>
<h1>{{ counter }}</h1>
<button @click="increment" />
</div>
</template>
<script>
import { loguxMixin } from '@logux/vuex'
export default {
name: 'Counter',
mixins: [loguxMixin],
computed: {
// Retrieve counter state from store
counter () {
return this.$store.state.counter
},
// Load current counter from server and subscribe to counter changes
channels () {
return ['counter']
}
},
methods: {
increment () {
// Send action to the server and all tabs in this browser
this.$store.commit.sync({ type: 'INC' })
}
}
}
</script>
<template>
<logux-component :channels="[`user/${ userId }`]" v-slot="{ isSubscribing }">
<div v-if="isSubscribing">
<h1>Loading</h1>
</div>
<div v-else>
<h1>{{ user.name }}</h1>
<button @click="increment" />
</div>
</logux-component>
</template>
<script>
import { loguxComponent } from '@logux/vuex'
export default {
name: 'UserProfile',
components: {
loguxComponent
},
props: {
userId: String
},
computed: {
// Retrieve counter state from store
user () {
return this.$store.state.user
}
}
}
</script>
0.7.1
FAQs
Vuex compatible API for Logux
The npm package @logux/vuex receives a total of 54 weekly downloads. As such, @logux/vuex popularity was classified as not popular.
We found that @logux/vuex demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
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.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.