File tree Expand file tree Collapse file tree 4 files changed +11
-9
lines changed Expand file tree Collapse file tree 4 files changed +11
-9
lines changed Original file line number Diff line number Diff line change 1
- import {Meta } from ' @storybook/addon-docs'
1
+ import { Meta } from ' @storybook/addon-docs' ;
2
2
3
3
<Meta title = " Migrating from react-use" />
4
4
@@ -238,7 +238,9 @@ Not implemented yet
238
238
239
239
#### useInterval
240
240
241
- Not implemented yet
241
+ Implemented as [ useIntervalEffect] ( /docs/lifecycle-useintervaleffect--example )
242
+
243
+ No API changes, besides name change.
242
244
243
245
#### useSpring
244
246
@@ -498,7 +500,7 @@ No API changes.
498
500
499
501
#### useEffectOnce
500
502
501
- No plans to implement
503
+ Was just an alias for [ useMountEffect ] ( /docs/lifecycle-usemounteffect-example ) - use that directly instead.
502
504
503
505
#### useEvent
504
506
Original file line number Diff line number Diff line change 1
- import {Canvas , Meta , Story } from ' @storybook/addon-docs' ;
2
- import {Example } from ' ./example.stories' ;
3
- import {ImportPath } from ' ../../__docs__/ImportPath' ;
1
+ import { Canvas , Meta , Story } from ' @storybook/addon-docs' ;
2
+ import { Example } from ' ./example.stories' ;
3
+ import { ImportPath } from ' ../../__docs__/ImportPath' ;
4
4
5
5
<Meta title = " Lifecycle/useIntervalEffect" component = { Example } />
6
6
7
- # useInterval
7
+ # useIntervalEffect
8
8
9
9
Like ` setInterval ` but in the form of a React hook.
10
10
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import { renderHook } from '@testing-library/react-hooks/dom';
2
2
import { useIntervalEffect } from '../..' ;
3
3
import advanceTimersByTime = jest . advanceTimersByTime ;
4
4
5
- describe ( 'useInterval ' , ( ) => {
5
+ describe ( 'useIntervalEffect ' , ( ) => {
6
6
beforeAll ( ( ) => {
7
7
jest . useFakeTimers ( ) ;
8
8
} ) ;
Original file line number Diff line number Diff line change 1
1
import { renderHook } from '@testing-library/react-hooks/server' ;
2
2
import { useIntervalEffect } from '../..' ;
3
3
4
- describe ( 'useInterval ' , ( ) => {
4
+ describe ( 'useIntervalEffect ' , ( ) => {
5
5
it ( 'should be defined' , ( ) => {
6
6
expect ( useIntervalEffect ) . toBeDefined ( ) ;
7
7
} ) ;
You can’t perform that action at this time.
0 commit comments