Socket
Socket
Sign inDemoInstall

@nanostores/preact

Package Overview
Dependencies
2
Maintainers
4
Versions
12
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nanostores/preact


Version published
Weekly downloads
2.2K
increased by7.49%
Maintainers
4
Install size
4.97 kB
Created
Weekly downloads
 

Changelog

Source

0.5.1

  • Added Nano Stores 0.10 support.

0.5

  • Moved to Nano Stores 0.9.

Readme

Source

Nano Stores Preact

Preact integration for Nano Stores, a tiny state manager with many atomic tree-shakable stores.

  • Small. Less than 1 KB. Zero dependencies.
  • Fast. With small atomic and derived stores, you do not need to call the selector function for all components on every store change.
  • Tree Shakable. The chunk contains only stores used by components in the chunk.
  • Was designed to move logic from components to stores.
  • It has good TypeScript support.
import { useStore } from '@nanostores/preact'

import { profile } from '../stores/profile.js'

export const Header = () => {
  const { userId } = useStore(profile)
  return <header>{currentUser.name}</header>
}
Sponsored by Evil Martians

Keywords

FAQs

Last updated on 20 Feb 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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc