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

effector-vue

Package Overview
Dependencies
Maintainers
0
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

effector-vue

Vue bindings for effector

  • 23.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

effector-vue

Vue bindings for effector

Installation

npm install --save effector effector-vue

Or using yarn

yarn add effector effector-vue

Usage

import {createStore, createEvent} from 'effector'

export const inputText = createEvent()

export const $text = createStore('').on(inputText, (_, text) => text)

export const $size = $text.map(text => text.length)
<script lang="ts" setup>
  import {useUnit} from 'effector-vue/composition'
  import {$text, $size, inputText} from './model'

  const text = useUnit($text)
  const size = useUnit($size)

  const handleTextChange = useUnit(inputText)
</script>

<template>
  <form>
    <input
      type="text"
      @input="(e) => handleTextChange(e.currentTarget.value)"
      :value="text"
    />
    <p>Length: {{ size }}</p>
  </form>
</template>

Try it

useUnit in docs Units in docs createStore in docs createEvent in docs

Keywords

FAQs

Package last updated on 25 Oct 2024

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