File tree Expand file tree Collapse file tree 1 file changed +13
-13
lines changed Expand file tree Collapse file tree 1 file changed +13
-13
lines changed Original file line number Diff line number Diff line change 6
6
/* eslint-disable import/order */
7
7
/* eslint-disable import/no-extraneous-dependencies */
8
8
/* eslint-disable react/jsx-filename-extension */
9
- // @ts -nocheck
10
- import React , { Component } from 'react' ;
9
+ import { string } from 'prop-types' ;
10
+ import React , { useState } from 'react' ;
11
11
import { render } from 'react-dom' ;
12
12
import linkFiberStart from '../linkFiber' ;
13
13
@@ -24,17 +24,17 @@ let snapShot;
24
24
let browser ;
25
25
let page ;
26
26
27
- class App extends Component {
28
- state : { foo : string ; } ;
29
- constructor ( props ) {
30
- super ( props ) ;
31
- this . state = { foo : 'bar' } ;
32
- }
33
-
34
- render ( ) {
35
- const { foo } = this . state ;
36
- return < div > { foo } </ div > ;
37
- }
27
+ interface fooState {
28
+ foo : string ,
29
+ setFoo ?: ( string ) => void
30
+ }
31
+ function App ( ) : JSX . Element {
32
+ const [ fooState , setFooState ] = useState ( {
33
+ foo : 'bar' ,
34
+ } ) ;
35
+ return (
36
+ < div > { fooState } </ div >
37
+ ) ;
38
38
}
39
39
40
40
xdescribe ( 'unit test for linkFiber' , ( ) => {
You can’t perform that action at this time.
0 commit comments