@zedux/core
TypeScript icon, indicating that this package has built-in type declarations

1.3.4 • Public • Published

@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.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.3.0-rc.20canary
1.3.4502latest
2.0.0-rc.9417next
1.3.15lts

Version History

VersionDownloads (Last 7 Days)Published
2.0.0-rc.9417
2.0.0-rc.81
2.0.0-rc.71
2.0.0-rc.60
2.0.0-rc.50
2.0.0-rc.40
2.0.0-rc.31
2.0.0-rc.20
2.0.0-rc.10
2.0.0-rc.00
2.0.0-beta.80
2.0.0-beta.70
2.0.0-beta.60
2.0.0-beta.50
1.3.4502
2.0.0-beta.40
2.0.0-beta.30
2.0.0-beta.20
1.3.30
1.3.20
1.3.15
2.0.0-beta.10
2.0.0-beta.01
1.3.01
2.0.0-alpha.11
2.0.0-alpha.00
1.2.3742
1.3.0-rc.20
1.3.0-rc.10
1.3.0-rc.00
1.2.21,256
1.2.2-rc.00
1.2.10
1.2.011
1.2.0-rc.10
1.2.0-rc.00
1.1.141
1.1.00
1.1.0-rc.00
1.0.30
1.0.20
1.0.10
1.0.01
1.0.0-rc.01
0.5.110
0.5.100
0.5.90
0.5.80
0.5.70

Package Sidebar

Install

npm i @zedux/core

Weekly Downloads

2,982

Version

1.3.4

License

MIT

Unpacked Size

315 kB

Total Files

92

Last publish

Collaborators

  • bowheart