ks-fwork 3.0.2 → 3.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ks-fwork",
3
- "version": "3.0.2",
3
+ "version": "3.0.3",
4
4
  "description": "Demo Frontend Framework",
5
5
  "license": "ISC",
6
6
  "author": "",
package/src/app.js CHANGED
@@ -1,7 +1,5 @@
1
1
  import { destroyDOM } from "./destroy-dom.js";
2
- import { Dispatcher } from "./dispatcher.js";
3
2
  import { mountDOM } from "./mount-dom.js";
4
- import { patchDOM } from "./patch-dom.js";
5
3
  import { h } from "./h.js";
6
4
 
7
5
  export function createApp(RootComponent, props = {}) {
@@ -9,9 +7,6 @@ export function createApp(RootComponent, props = {}) {
9
7
  let rootNode = null;
10
8
  let isMounted = false;
11
9
 
12
- const dispatcher = new Dispatcher();
13
- const unsubscribers = [dispatcher.afterEveryCommand(renderApp)];
14
-
15
10
  function reset() {
16
11
  parentEl = null;
17
12
  rootNode = null;
package/src/mount-dom.js CHANGED
@@ -4,7 +4,7 @@ import { addEventListeners } from "./events.js";
4
4
  import { extractPropsAndEvents } from "./utils/props.js";
5
5
 
6
6
  // Recursively mount a virtual node (and its subtree) into a real parent DOM element.
7
- export function mountDOM(vNode, parentEl, index, hostComponent = null) {
7
+ export function mountDOM(vNode, parentEl, index = undefined, hostComponent = null) {
8
8
  switch (vNode.type) {
9
9
  case DOM_TYPES.TEXT: {
10
10
  createTextNode(vNode, parentEl, index);