New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

orpheus-bind

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

orpheus-bind - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

src/demo/loggingMiddleware.ts

2

package.json
{
"name": "orpheus-bind",
"version": "0.0.2",
"version": "0.0.3",
"author": "JoaoPauloCMarra <joaopaulocmarra@gmail.com> (http://webnexus.com.br/)",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -11,2 +11,3 @@ # OrpheusBind 🎶

- No need to install RxJS separately
- Middleware support for intercepting and modifying actions or updates
- Lightweight and easy to integrate

@@ -19,2 +20,8 @@

```bash
npm install orpheus-bind
```
or
```bash
yarn add orpheus-bind

@@ -32,3 +39,3 @@ ```

import { createGlobalState } from 'orpheus-bind';
import { createGlobalState, Middleware } from 'orpheus-bind';

@@ -46,3 +53,9 @@ export interface UserGlobalState {

export const useUserGlobalState = createGlobalState<UserGlobalState>(initialState);
// Optional middleware for logging state updates
const loggingMiddleware: Middleware<UserGlobalState> = (currentState, newStateOrUpdater) => {
console.log('Updating state:', currentState, newStateOrUpdater);
return newStateOrUpdater;
};
export const useUserGlobalState = createGlobalState<UserGlobalState>(initialState, loggingMiddleware);
```

@@ -88,11 +101,2 @@

# 🚀 Future Features
- Middleware support for intercepting and modifying actions or updates
- DevTools integration for easy debugging and monitoring of state changes
- Code splitting and lazy loading support
- Efficient updates and memoization to minimize unnecessary renders
- Scoped state management for better application structure
- Easier integration with other popular libraries
- Better error handling and recovery
- Comprehensive documentation and examples
#### also check the [DEMO](src/demo) application to see a simplier implementation example

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc