Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@flexbase/store-react

Package Overview
Dependencies
Maintainers
4
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@flexbase/store-react - npm Package Compare versions

Comparing version
2.1.1
to
3.0.0
+2
-2
dist/core/use.store.d.ts
import { SubscriptionCallback } from '@flexbase/observable-subject';
import { Setter, Store } from '@flexbase/store';
/**
* A hook that attaches a store to a react state
* A hook that attaches a store to a react state.
* Internally it uses `useState` and `useEffect` to create a subscription between the store and react state

@@ -9,2 +9,2 @@ * @param store The store to use

*/
export declare const useStore: <T>(store: Store<T>, subscribe?: SubscriptionCallback<T> | undefined) => [T | undefined, Setter<T>];
export declare const useStore: <T>(store: Store<T>, subscribe?: SubscriptionCallback<T> | undefined) => [T, Setter<T>];
import { Setter, Store } from '@flexbase/store';
/**
* A hook that attaches a store to a react state
* A hook that attaches a store to a react state.
* Internally it uses `useState` and `useLayoutEffect` to create a subscription between the store and react state

@@ -8,2 +8,2 @@ * @param store The store to use

*/
export declare const useStoreLayout: <T>(store: Store<T>) => [T | undefined, Setter<T>];
export declare const useStoreLayout: <T>(store: Store<T>) => [T, Setter<T>];
{
"name": "@flexbase/store-react",
"version": "2.1.1",
"version": "3.0.0",
"description": "React extensions for @flexbase/store",

@@ -20,4 +20,4 @@ "main": "./dist/index.js",

"dependencies": {
"@flexbase/observable-subject": "^2.1.0",
"@flexbase/store": "^2.0.3"
"@flexbase/observable-subject": "^2.1.1",
"@flexbase/store": "^3.0.1"
},

@@ -24,0 +24,0 @@ "peerDependencies": { "react": "^18.1.0" },