Skip to content
BhoosPublic

About

State Management Library

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

MutateX Library

Installation

npm install @bhoos/mutate-x

APIs

createState

useMutateX

useMutateXSelector

Usage

// Create global store

const TodoState = createState({
  todos: [
    // id is treated specially as key
    {id: 1, title: 'Get Milk', completed: false }
  ],
});


// Use hooks to subscribe to specific items
const { todos } = useMutateX(TodoState, ['todos']);

// can also listen on internal items extracted from array or object
// 
const { title, completed } = useMutateX(item, ['title', 'completed']);

About

State Management Library

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages