Skip to content

Commit

Permalink
add hot utilities
Browse files Browse the repository at this point in the history
  • Loading branch information
kbrsh committed Jul 18, 2018
1 parent f61723d commit 1de8c9b
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions packages/moon-mvl/lib/hot.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
let components = [];

module.exports.register = (component) => {
components.push(component);
};

module.exports.remove = () => {
for (let i = 0; i < components.length; i++) {
components[i].destroy();
}

components = [];
};

0 comments on commit 1de8c9b

Please sign in to comment.