File tree 2 files changed +9
-15
lines changed
docs/src/pages/components/no-ssr
2 files changed +9
-15
lines changed Original file line number Diff line number Diff line change @@ -10,13 +10,7 @@ const useStyles = makeStyles({
10
10
} ) ;
11
11
12
12
function LargeTree ( ) {
13
- return (
14
- < >
15
- { Array . from ( new Array ( 3000 ) ) . map ( ( _ , index ) => (
16
- < span key = { index } > .</ span >
17
- ) ) }
18
- </ >
19
- ) ;
13
+ return Array . from ( new Array ( 3000 ) ) . map ( ( _ , index ) => < span key = { index } > .</ span > ) ;
20
14
}
21
15
22
16
function FrameDeferring ( ) {
Original file line number Diff line number Diff line change @@ -9,14 +9,14 @@ const useStyles = makeStyles({
9
9
} ,
10
10
} ) ;
11
11
12
- function LargeTree ( ) {
13
- return (
14
- < >
15
- { Array . from ( new Array ( 3000 ) ) . map ( ( _ , index ) => (
16
- < span key = { index } > . </ span >
17
- ) ) }
18
- </ >
19
- ) ;
12
+ /**
13
+ * Changing the return value of this component to `any`
14
+ * As currently typescript does not support returning array from components
15
+ *
16
+ * https://github.com/DefinitelyTyped/DefinitelyTyped/issues/20356
17
+ */
18
+ function LargeTree ( ) : any {
19
+ return Array . from ( new Array ( 3000 ) ) . map ( ( _ , index ) => < span key = { index } > . </ span > ) ;
20
20
}
21
21
22
22
function FrameDeferring ( ) {
You can’t perform that action at this time.
0 commit comments