Skip to content

Commit

Permalink
remove unused imports
Browse files Browse the repository at this point in the history
  • Loading branch information
yelouafi committed Apr 21, 2021
1 parent da06498 commit e161097
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 16 deletions.
7 changes: 0 additions & 7 deletions examples/stateMachineComponent/stateMachineComponent.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
import {
mount,
patchInPlace,
unmount,
getParentNode,
} from "../../src/index.js";

export function createSMComponent({ view, update, output }) {
return {
mount(me) {
Expand Down
10 changes: 1 addition & 9 deletions examples/withStateComppnent/withStateComponent.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
import {
mount,
patchInPlace,
unmount,
getParentNode,
} from "../../src/index.js";

export function withState(view, getInitialState) {
return {
mount(me) {
me.view = view;
me.setState = (updater) => {
let newState = updater(me.state, me.props);
if (newState !== me.state) {
Expand All @@ -19,7 +11,7 @@ export function withState(view, getInitialState) {
me.setState((_, props) => getInitialState(props));
},
patch(me) {
me.render(me.view(me.props, me.state, me.setState));
me.render(view(me.props, me.state, me.setState));
},
};
}

0 comments on commit e161097

Please sign in to comment.