Skip to content

Commit

Permalink
Fix microbundle bug (#35)
Browse files Browse the repository at this point in the history
* Fix microbundle bug

* fix
  • Loading branch information
aralroca authored Nov 8, 2021
1 parent 5f48c89 commit 11c6a82
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "teaful",
"version": "0.7.0",
"version": "0.7.1",
"description": "Tiny, easy and powerful React state management (less than 1kb)",
"license": "MIT",
"keywords": [
Expand Down
4 changes: 3 additions & 1 deletion package/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,9 @@ export default function createStore(defaultStore = {}, callback) {

// subscribe to the fragmented store
if (mode === MODE_USE) {
useEffect(() => initializeValue && update(value), []);
useEffect(() => {
if (initializeValue) update(value);
}, []);
useSubscription(DOT+prop, callback);
}

Expand Down

0 comments on commit 11c6a82

Please sign in to comment.