little-state-machine
Advanced tools
Comparing version 2.6.0-beta.5 to 2.6.0
@@ -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", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
1
25146
470
5