File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
packages/node_modules/overmind-react/src Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -79,13 +79,13 @@ export const createHook = <Config extends Configuration>(
7979 typeof component . __componentId === 'undefined'
8080 ? nextComponentId ++
8181 : component . __componentId
82- const [ tree , updateComponent ] = useState < any > ( ( ) =>
83- ( overmind as any ) . proxyStateTree . getTrackStateTree ( )
84- )
82+ const [ { tree } , updateComponent ] = useState < any > ( ( ) => ( {
83+ tree : ( overmind as any ) . proxyStateTree . getTrackStateTree ( ) ,
84+ } ) )
8585
8686 if ( IS_PRODUCTION ) {
8787 tree . track ( ( ) => {
88- updateComponent ( ( state ) => state )
88+ updateComponent ( ( { tree } ) => ( { tree } ) )
8989 } )
9090
9191 useEffect (
@@ -100,7 +100,7 @@ export const createHook = <Config extends Configuration>(
100100 )
101101
102102 tree . track ( ( _ , paths , flushId ) => {
103- updateComponent ( ( state ) => state )
103+ updateComponent ( ( { tree } ) => ( { tree } ) )
104104 overmind . eventHub . emitAsync ( EventType . COMPONENT_UPDATE , {
105105 componentId : component . __componentId ,
106106 componentInstanceId,
You can’t perform that action at this time.
0 commit comments