Skip to content

Commit dd0cefa

Browse files
feat(overmind-components): state and stuff
1 parent 92bf38e commit dd0cefa

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

packages/node_modules/overmind-components/src/component.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ function init(componentVNode: VNode): void {
2626
const tree = component.tree
2727
let currentNode = componentVNode
2828

29-
function createComponentVNode(newState) {
29+
const createComponentVNode = (newState) => {
3030
return (component.fn as any)(component.props, {
3131
changeState: update,
3232
state:
@@ -38,7 +38,7 @@ function init(componentVNode: VNode): void {
3838
})
3939
}
4040

41-
function update(newState?) {
41+
const update = (newState?) => {
4242
tree.track(onFlush)
4343
try {
4444
currentNode.elm = componentVNode.elm
@@ -54,7 +54,7 @@ function init(componentVNode: VNode): void {
5454
tree.stopTracking()
5555
}
5656

57-
function onFlush(_, __, flushId) {
57+
const onFlush = (_, __, flushId) => {
5858
update()
5959

6060
getApp().eventHub.emitAsync(EventType.COMPONENT_UPDATE, {

packages/node_modules/overmind-components/src/createElement.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { VALUE } from 'proxy-state-tree'
21
import h from 'snabbdom/h'
32

43
import { component } from './component'

0 commit comments

Comments
 (0)