Comparing version 2.0.1 to 2.0.2
# Change Log | ||
This project adheres to [Semantic Versioning](http://semver.org/). | ||
## 2.0.2 | ||
* Fix `ref` in wrapped component (by Andrey Ivliev). | ||
* Fix React Native support. | ||
* Reduce package size. | ||
## 2.0.1 | ||
@@ -5,0 +10,0 @@ * Mark package to be free from side effects. |
{ | ||
"type": "module", | ||
"main": "index.cjs", | ||
"module": "index.js" | ||
"module": "index.js", | ||
"react-native": "index.js" | ||
} |
{ | ||
"name": "storeon", | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"description": "Tiny (167 bytes) event-based Redux-like state manager for React and Preact", | ||
@@ -31,9 +31,8 @@ "keywords": [ | ||
}, | ||
"eslintIgnore": [ | ||
"test/demo/dist" | ||
], | ||
"type": "module", | ||
"main": "index.cjs", | ||
"module": "index.js", | ||
"react-native": "index.js", | ||
"exports": { | ||
"./package.json": "./package.json", | ||
".": { | ||
@@ -43,2 +42,3 @@ "require": "./index.cjs", | ||
}, | ||
"./devtools/package.json": "./devtools/package.json", | ||
"./devtools": { | ||
@@ -48,2 +48,3 @@ "require": "./devtools/index.cjs", | ||
}, | ||
"./preact/package.json": "./preact/package.json", | ||
"./preact": { | ||
@@ -53,2 +54,3 @@ "require": "./preact/index.cjs", | ||
}, | ||
"./react/package.json": "./react/package.json", | ||
"./react": { | ||
@@ -55,0 +57,0 @@ "require": "./react/index.cjs", |
@@ -5,2 +5,3 @@ import { | ||
import { createContext, h } from 'preact' | ||
import { forwardRef } from 'preact/compat' | ||
@@ -43,8 +44,8 @@ let StoreContext = createContext() | ||
let Component = keys.pop() | ||
return originProps => { | ||
let props = { ...originProps, ...useStoreon(...keys) } | ||
return forwardRef((originProps, ref) => { | ||
let props = { ...originProps, ...useStoreon(...keys), ref } | ||
return h(Component, props) | ||
} | ||
}) | ||
} | ||
export { useStoreon, StoreContext, connectStoreon } |
{ | ||
"type": "module", | ||
"main": "index.cjs", | ||
"module": "index.js" | ||
"module": "index.js", | ||
"react-native": "index.js" | ||
} |
import { | ||
useMemo, useContext, useState, useLayoutEffect, useEffect, | ||
createContext, createElement | ||
createContext, createElement, forwardRef | ||
} from 'react' | ||
@@ -42,8 +42,9 @@ | ||
let Component = keys.pop() | ||
return originProps => { | ||
let props = { ...originProps, ...useStoreon(...keys) } | ||
return forwardRef((originProps, ref) => { | ||
let props = { ...originProps, ...useStoreon(...keys), ref } | ||
return createElement(Component, props) | ||
} | ||
}) | ||
} | ||
export { useStoreon, StoreContext, connectStoreon } |
{ | ||
"type": "module", | ||
"main": "index.cjs", | ||
"module": "index.js" | ||
"module": "index.js", | ||
"react-native": "index.js" | ||
} |
@@ -7,3 +7,3 @@ # Storeon | ||
A tiny event-based Redux-like state manager for **React**, **Preact**, | ||
**[Angular]**, and **[Svelte]**. | ||
**[Angular]**, **[Vue]** and **[Svelte]**. | ||
@@ -58,2 +58,3 @@ * **Small.** 167 bytes (minified and gzipped). No dependencies. | ||
[Svelte]: https://github.com/storeon/svelte | ||
[Vue]: https://github.com/storeon/vue | ||
@@ -60,0 +61,0 @@ <a href="https://evilmartians.com/?utm_source=storeon"> |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
34910
636
373