From 9c71f6dee273a2e248c75eb9c676506ebc3a5fd3 Mon Sep 17 00:00:00 2001 From: Ganesh Date: Thu, 17 Oct 2019 22:09:47 +0530 Subject: [PATCH] [docs] : Chnage return value of LargeTree component to any --- .../pages/components/no-ssr/FrameDeferring.js | 8 +------- .../pages/components/no-ssr/FrameDeferring.tsx | 16 ++++++++-------- 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/docs/src/pages/components/no-ssr/FrameDeferring.js b/docs/src/pages/components/no-ssr/FrameDeferring.js index 31b06f167418b9..fc1b85a60e698d 100644 --- a/docs/src/pages/components/no-ssr/FrameDeferring.js +++ b/docs/src/pages/components/no-ssr/FrameDeferring.js @@ -10,13 +10,7 @@ const useStyles = makeStyles({ }); function LargeTree() { - return ( - <> - {Array.from(new Array(3000)).map((_, index) => ( - . - ))} - - ); + return Array.from(new Array(3000)).map((_, index) => .); } function FrameDeferring() { diff --git a/docs/src/pages/components/no-ssr/FrameDeferring.tsx b/docs/src/pages/components/no-ssr/FrameDeferring.tsx index 31b06f167418b9..8e748e43b679f9 100644 --- a/docs/src/pages/components/no-ssr/FrameDeferring.tsx +++ b/docs/src/pages/components/no-ssr/FrameDeferring.tsx @@ -9,14 +9,14 @@ const useStyles = makeStyles({ }, }); -function LargeTree() { - return ( - <> - {Array.from(new Array(3000)).map((_, index) => ( - . - ))} - - ); +/** + * Changing the return value of this component to `any` + * As currently typescript does not support returning array from components + * + * https://github.com/DefinitelyTyped/DefinitelyTyped/issues/20356 + */ +function LargeTree(): any { + return Array.from(new Array(3000)).map((_, index) => .); } function FrameDeferring() {