little-state-machine
Advanced tools
Comparing version 2.5.0-beta.3 to 2.5.0
@@ -45,2 +45,4 @@ import * as React from 'react'; | ||
window['STATE_MACHINE_LOAD'] = ({ storeName, data, }) => { | ||
if (!storeName && !data) | ||
return; | ||
storageType.setItem(getName(), data || storageType.getItem(storeName)); | ||
@@ -47,0 +49,0 @@ }; |
@@ -48,2 +48,4 @@ 'use strict'; | ||
window['STATE_MACHINE_LOAD'] = ({ storeName, data, }) => { | ||
if (!storeName && !data) | ||
return; | ||
storageType.setItem(getName(), data || storageType.getItem(storeName)); | ||
@@ -50,0 +52,0 @@ }; |
{ | ||
"name": "little-state-machine", | ||
"version": "2.5.0-beta.3", | ||
"version": "2.5.0", | ||
"main": "dist/index.js", | ||
@@ -5,0 +5,0 @@ "module": "dist/index.es.js", |
@@ -74,12 +74,13 @@ <div align="center"><img src="https://github.com/bluebill1049/little-state-machine/blob/master/docs/logo.png" alt="React forme Logo - React hook form valiation" width="180px" /> | ||
##### 🔗 `window.STATE_MACHINE_LOAD` | ||
Load saved state into your app, you can either supply a session/local storage name, or supply a string of data. | ||
Load saved state into your app, you can either supply a name of your session/local storage, or supply a string of data. | ||
`window.STATE_MACHINE_GET_STORE({ storeName: string, data: Object })` | ||
`window.STATE_MACHINE_GET_STORE({ storeName?: string, data?: Object })` | ||
storeName: external session/local storage name | ||
data: string of data | ||
`storeName`: external session/local storage name | ||
`data`: string of data | ||
## Example | ||
app.js | ||
📋 `app.js` | ||
```jsx | ||
@@ -105,3 +106,3 @@ import React from 'react' | ||
yourComponent.js | ||
📋 `yourComponent.js` | ||
```jsx | ||
@@ -122,3 +123,3 @@ import React from 'react' | ||
yourDetail.js | ||
📋 `yourDetail.js` | ||
```js | ||
@@ -130,3 +131,3 @@ export default { | ||
action.js | ||
📋 `action.js` | ||
```js | ||
@@ -133,0 +134,0 @@ export function updateName(state, payload) { |
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
20322
363
1
139