Skip to content
This repository has been archived by the owner on Feb 14, 2023. It is now read-only.

Commit

Permalink
resolves #28
Browse files Browse the repository at this point in the history
  • Loading branch information
Charles Stover - Vendor committed Dec 12, 2018
1 parent 7fcd94c commit dffdea2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "reactn",
"version": "0.1.7",
"version": "0.1.8",
"author": "Charles Stover <[email protected]>",
"description": "React, but with built-in global state management.",
"license": "MIT",
Expand Down
7 changes: 7 additions & 0 deletions src/global-state-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,16 @@ class GlobalStateManager {

// Unmap a component instance from all state properties.
removePropertyListener(propertyListener) {

// Remove this property listener from the global state.
for (const propertyListeners of this._propertyListeners.values()) {
propertyListeners.delete(propertyListener);
}

// Remove this property listener from currently-executing transactions.
for (const transaction of this._transactions.values()) {
transaction.propertyListeners.delete(propertyListener);
}
}

// Reset the global state.
Expand Down

0 comments on commit dffdea2

Please sign in to comment.