Socket
Socket
Sign inDemoInstall

effector-solid

Package Overview
Dependencies
5
Maintainers
5
Versions
16
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    effector-solid

SolidJS bindings for effector


Version published
Weekly downloads
834
increased by21.75%
Maintainers
5
Created
Weekly downloads
 

Changelog

Source

effector-solid 0.23.0

  • Make all hooks isomorphic
  • Deprecate effector-solid/scope in favor of isomorphic hooks (PR #979)

Readme

Source

effector-solid

SolidJS bindings for effector

Installation

npm install --save effector effector-solid

Or using yarn

yarn add effector effector-solid

Or using pnpm

pnpm add effector effector-solid

Usage

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

import {useUnit} from 'effector-solid'

const inputText = createEvent()

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

const $size = createStore(0).on(inputText, (_, text) => text.length)

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

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

Keywords

FAQs

Last updated on 28 Nov 2023

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc