gjendje
| Install | |
|---|---|
npm install gjendje |
|
| Latest Version: | 1.5.0 |
| Vue: | 3 |
| License: | MIT |
| Last Updated: | Mar 31, 2026 |
| Links: | GitHub · npm |
gjendje
gjendje is a storage-agnostic state management library for TypeScript and JavaScript. It gives you a single, unified API for reactive state — regardless of where that state lives.
Install
npm install gjendje
Quick start
import { state } from 'gjendje'
const store = state({ count: 0 })
// set
store.set({ count: 1 })
store.set((prev) => ({ ...prev, count: prev.count + 1 }))
// get
store.get()
const { count } = store.get()
// reset
store.reset()
Framework Bindings
React
import { state } from 'gjendje'
import { useGjendje } from 'gjendje/react'
const counter = state({ counter: 0 })
function Counter() {
const [count, setCount, resetCount] = useGjendje(counter)
return <button onClick={() => setCount(prev => prev + 1)}>{count}</button>
}
Vue
<script setup>
import { state } from 'gjendje'
import { useGjendje } from 'gjendje/vue'
const counter = state({ counter: 0 })
const count = useGjendje(counter)
</script>
<template>
<button @click="count++">{{ count }}</button>
</template>
Svelte
<script>
import { state } from 'gjendje'
import { useGjendje } from 'gjendje/svelte'
const counter = state({ counter: 0 })
const count = useGjendje(counter)
</script>
<button on:click={() => $count++}>
{$count}
</button>
API
get, peek, set, patch, mutate, reset, destroy, subscribe, watch, intercept, onChange
Primitives
computed, select, previous, readonly, collection, effect, when, resource, channel, toSignal, fromSignal
Scopes
memory, local, session, url, bucket, server
Utilities
batch, snapshot, destroyAll, withHistory, withWatch, withServerSession
DevTools
Configure
scope, maxKeys, prefix, requireValidation, registry, ssr, sync, warnOnDuplicate, onChange, onDestroy, onError, onExpire, onHydrate, onIntercept, onMigrate, onQuotaExceeded, onRegister, onReset, onSync, onValidationFail
License
MIT
Icon
Created by Gulraiz
Related Packages
A tiny (351 bytes) state manager for React/Preact/Vue/Svelte with many atomic tr...
A tiny (266 bytes) state manager for React/Preact/Vue/Svelte with many atomic tr...
A Pinia plugin for state persistence with multiple storage adapters
A store for Nano Stores state manager to keep data in localStorage
A store for Nano Stores state manager to keep data in sessionStorage
Version History
| Version | Released | Vue | License |
|---|---|---|---|
| 1.5.0 | >=3.3.0 | MIT | |
| 1.4.1 | >=3.3.0 | MIT | |
| 1.4.0 | >=3.3.0 | MIT | |
| 1.3.7 | >=3.3.0 | MIT | |
| 1.3.6 | >=3.3.0 | MIT | |
| 1.3.5 | >=3.3.0 | MIT | |
| 1.3.4 | >=3.3.0 | MIT | |
| 1.3.3 | >=3.3.0 | MIT | |
| 1.3.2 | >=3.3.0 | MIT | |
| 1.3.1 | >=3.3.0 | MIT | |
| 1.3.0 | >=3.3.0 | MIT | |
| 1.2.1 | >=3.3.0 | MIT | |
| 1.2.0 | >=3.3.0 | MIT | |
| 1.1.0 | >=3.3.0 | MIT | |
| 1.0.10 | MIT | ||
| 1.0.9 | MIT | ||
| 1.0.8 | MIT | ||
| 1.0.7 | MIT | ||
| 1.0.6 | MIT | ||
| 1.0.5 | MIT | ||
| 1.0.4 | MIT | ||
| 1.0.3 | MIT | ||
| 1.0.2 | MIT | ||
| 1.0.1 | MIT | ||
| 1.0.0 | MIT | ||
| 0.9.3 | MIT | ||
| 0.9.2 | MIT | ||
| 0.9.0 | MIT | ||
| 0.8.0 | MIT | ||
| 0.7.1 | MIT |
Showing the latest 30 of 47. See every release on npm