Socket
Socket
Sign inDemoInstall

@zedux/core

Package Overview
Dependencies
0
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @zedux/core

A high-level, declarative, composable form of Redux


Version published
Weekly downloads
943
increased by47.81%
Maintainers
1
Install size
356 kB
Created
Weekly downloads
 

Changelog

Source

v1.2.0 (Feb 6, 2024)

This is mostly a republish of the last v1.2.0 release candidate. Looks good :+1:

Fixes:

  • react: improve types for AtomProvider (#92)

Readme

Source

@zedux/core

This package includes the core composable store model of Zedux. It exports several utilities and TypeScript types for working with Zedux stores.

This package is framework-independent.

If you're new to Zedux, you're probably looking for the quick start.

Installation

npm install @zedux/core # npm
yarn add @zedux/core # yarn
pnpm add @zedux/core # pnpm

If you're using React, you probably want to install the @zedux/react package instead, which includes everything from this package, everything from the @zedux/atoms package, and more.

Usage

See the top-level README for a general overview of Zedux.

See the Zedux documentation for comprehensive usage details.

Basic example:

import { createStore } from '@zedux/core'

// a zero-config store:
const store = createStore(null, 'Hello, World!')

const subscription = store.subscribe((newState, oldState) => {
  console.log('store went from', oldState, 'to', newState)
})

store.getState() // 'Hello, World!'
store.setState('Goodbye, World!')

Exports

This package exports the following APIs, along with many TypeScript types for working with them:

Classes

Factories

Utils

For Authors

If your lib only use APIs in this package, it's recommended to only import this package, not @zedux/atoms or @zedux/react. This package is small enough that you may consider bundling it in with your code, but that shouldn't be necessary. It's usually recommended to use a peer dependency + dev dependency on this package.

Contributing, License, Etc

See the top-level README for all the technical stuff.

Keywords

FAQs

Last updated on 06 Feb 2024

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