Skip to content

Commit e2008c8

Browse files
authored
Avoid util deep imports (#17)
* chore: avoid util deep imports * style: consolidate util imports
1 parent 5455ccb commit e2008c8

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@
4242
"watch": "father dev"
4343
},
4444
"dependencies": {
45-
"@rc-component/util": "^1.2.0"
45+
"@rc-component/util": "^1.11.1"
4646
},
4747
"devDependencies": {
48-
"@rc-component/father-plugin": "^2.0.2",
48+
"@rc-component/father-plugin": "^2.2.0",
4949
"@rc-component/np": "^1.0.3",
5050
"@testing-library/jest-dom": "^5.16.4",
5151
"@testing-library/react": "^13.0.0",

src/MutateObserver.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
import { getDOM } from '@rc-component/util/lib/Dom/findDOMNode';
2-
import useEvent from '@rc-component/util/lib/hooks/useEvent';
3-
import useLayoutEffect from '@rc-component/util/lib/hooks/useLayoutEffect';
41
import {
2+
getDOM,
53
getNodeRef,
64
supportNodeRef,
75
useComposeRef,
8-
} from '@rc-component/util/lib/ref';
6+
useEvent,
7+
useLayoutEffect,
8+
} from '@rc-component/util';
99
import React from 'react';
1010
import type { MutationObserverProps } from './interface';
1111
import useMutateObserver from './useMutateObserver';

src/useMutateObserver.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import canUseDom from '@rc-component/util/lib/Dom/canUseDom';
1+
import { canUseDom } from '@rc-component/util';
22
import React from 'react';
33

44
const defaultOptions: MutationObserverInit = {

0 commit comments

Comments
 (0)