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

@beef-flux/store

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@beef-flux/store - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

1

lib/base-store.d.ts
import * as React from 'react';
import { Manager } from './context';
export declare const useStore: <T>(store: Store<T>) => T;
export interface StateHistory<T> {

@@ -4,0 +5,0 @@ actionName: string;

@@ -16,2 +16,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var React = require("react");
var extend = require("extend");

@@ -25,2 +26,12 @@ var assign = require("lodash/assign");

var context_1 = require("./context");
exports.useStore = function (store) {
var _a = React.useState(store.getState()), storeState = _a[0], setStoreState = _a[1];
React.useEffect(function () {
store.listen(setStoreState);
return function () {
store.ignore(setStoreState);
};
});
return storeState;
};
var DEFAULT_CONFIG = {

@@ -27,0 +38,0 @@ async: false,

4

lib/index.d.ts
/// <reference types="react" />
import Actions, { ActionsManager } from './actions';
import Model from './model';
import Store from './base-store';
import Store, { useStore } from './base-store';
import { SubscribeMap } from './subscribe';

@@ -17,2 +17,2 @@ import { Manager as ContextManager } from './context';

export default _default;
export { ActionsManager, SubscribeMap, ContextManager, Schema };
export { ActionsManager, SubscribeMap, ContextManager, Schema, useStore };

@@ -7,2 +7,3 @@ "use strict";

var base_store_1 = require("./base-store");
exports.useStore = base_store_1.useStore;
var subscribe_1 = require("./subscribe");

@@ -9,0 +10,0 @@ var context_1 = require("./context");

{
"name": "@beef-flux/store",
"version": "0.1.1",
"version": "0.1.2",
"description": "Flux compatible state machine",

@@ -34,3 +34,3 @@ "keywords": [

},
"gitHead": "5202db4746ac6fb0a4813b961d3ef6c046c4728e"
"gitHead": "0c36c7b7ddd3666ad12630b3e75af0fff0b1d094"
}
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