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

little-state-machine

Package Overview
Dependencies
Maintainers
1
Versions
210
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

little-state-machine - npm Package Compare versions

Comparing version 2.6.0-beta.5 to 2.6.0

11

dist/index.es.js

@@ -130,6 +130,3 @@ import * as React from 'react';

};
function useStateMachine(updateStoreFunction, options = {
debugName: '',
shouldReRenderApp: true,
}) {
function useStateMachine(updateStoreFunction, options) {
const { store: globalState, updateStore } = useContext(StateMachineContext);

@@ -168,6 +165,6 @@ if (updateStoreFunction && Object.keys(updateStoreFunction).length) {

function devToolComponent() {
if (process.env.NODE_ENV === 'production')
return null;
const { state } = useStateMachine();
const [isCurrentState, setCurrentState] = useState(true);
const [isClose, setClose] = useState(false);
console.log('isClose', isClose);
return (createElement("div", { style: {

@@ -216,3 +213,3 @@ fontFamily: `BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif`,

createElement("section", { style: { padding: 10 } },
createElement(ReactJson, { src: isCurrentState ? state : {}, theme: "harmonic", iconStyle: "square", enableClipboard: true, collapsed: true, displayObjectSize: false, displayDataTypes: false, indentWidth: 2, style: {
createElement(ReactJson, { src: state, theme: "harmonic", iconStyle: "square", enableClipboard: true, collapsed: true, displayObjectSize: false, displayDataTypes: false, indentWidth: 2, style: {
fontSize: 12,

@@ -219,0 +216,0 @@ overflow: 'scroll',

@@ -135,6 +135,3 @@ 'use strict';

};
function useStateMachine(updateStoreFunction, options = {
debugName: '',
shouldReRenderApp: true,
}) {
function useStateMachine(updateStoreFunction, options) {
const { store: globalState, updateStore } = React.useContext(StateMachineContext);

@@ -173,6 +170,6 @@ if (updateStoreFunction && Object.keys(updateStoreFunction).length) {

function devToolComponent() {
if (process.env.NODE_ENV === 'production')
return null;
const { state } = useStateMachine();
const [isCurrentState, setCurrentState] = useState(true);
const [isClose, setClose] = useState(false);
console.log('isClose', isClose);
return (React.createElement("div", { style: {

@@ -221,3 +218,3 @@ fontFamily: `BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif`,

React.createElement("section", { style: { padding: 10 } },
React.createElement(ReactJson, { src: isCurrentState ? state : {}, theme: "harmonic", iconStyle: "square", enableClipboard: true, collapsed: true, displayObjectSize: false, displayDataTypes: false, indentWidth: 2, style: {
React.createElement(ReactJson, { src: state, theme: "harmonic", iconStyle: "square", enableClipboard: true, collapsed: true, displayObjectSize: false, displayDataTypes: false, indentWidth: 2, style: {
fontSize: 12,

@@ -224,0 +221,0 @@ overflow: 'scroll',

{
"name": "little-state-machine",
"version": "2.6.0-beta.5",
"version": "2.6.0",
"main": "dist/index.js",

@@ -5,0 +5,0 @@ "module": "dist/index.es.js",

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