New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

effector-react

Package Overview
Dependencies
Maintainers
5
Versions
144
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

effector-react

React bindings for effector

  • 22.1.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
32K
increased by2.13%
Maintainers
5
Weekly downloads
 
Created
Source

effector-react

React bindings for effector

Installation

npm install --save effector effector-react

Or using yarn

yarn add effector effector-react

Usage

import {createStore, combine, createEvent} from 'effector'

import {useUnit} from 'effector-react'

const inputText = createEvent()

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

const $size = $text.map(text => text.length)

const Form = () => {
  const {text, size} = useUnit({
    text: $text,
    size: $size,
  })
  const handleTextChange = useUnit(inputText)

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

Try it

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

Keywords

FAQs

Package last updated on 16 Jul 2022

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