Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

treble-hook

Package Overview
Dependencies
Maintainers
2
Versions
66
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

treble-hook - npm Package Compare versions

Comparing version 2.0.10 to 2.0.11

2

lib/index.d.ts

@@ -11,4 +11,4 @@ import React, { Dispatch, SetStateAction } from 'react';

export declare function useSub<T>(topic: string): T;
export declare function usePub<T>(topic: string): React.Dispatch<React.SetStateAction<T>>;
export declare function usePub<T>(topic: string): (value: T) => void;
export declare type Publish<T> = Dispatch<SetStateAction<T>>;
export declare type PubSubTuple<T> = [T, Publish<T>];

@@ -88,3 +88,3 @@ "use strict";

}
return context[1];
return (value) => { context[1](value); };
}

@@ -91,0 +91,0 @@ exports.usePub = usePub;

{
"name": "treble-hook",
"version": "2.0.10",
"version": "2.0.11",
"description": "Get hooked on simple subscribe-and-publish in ReactJS.",

@@ -5,0 +5,0 @@ "main": "./lib/index.js",

@@ -206,2 +206,4 @@

**IMPORTANT**: This hook will still cause re-renders when a new value is published even though the published value isn't used/returned.
```ts

@@ -208,0 +210,0 @@ usePub<T>(topic: string): (value: T) => void

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