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 66/* eslint-disable import/order */
77/* eslint-disable import/no-extraneous-dependencies */
88/* 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' ;
1111import { render } from 'react-dom' ;
1212import linkFiberStart from '../linkFiber' ;
1313
@@ -24,17 +24,17 @@ let snapShot;
2424let browser ;
2525let page ;
2626
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+ ) ;
3838}
3939
4040xdescribe ( 'unit test for linkFiber' , ( ) => {
You can’t perform that action at this time.
0 commit comments