From fb29a26246a47a6473e64ea3dbb23efdf596328f Mon Sep 17 00:00:00 2001 From: Valerio Ageno <51341197+Valerioageno@users.noreply.github.com> Date: Wed, 5 Feb 2025 17:45:12 +0100 Subject: [PATCH] docs: refine dynamic page hierarchy (#511) --- .../src/components/Sidebar/sidebarElements.ts | 8 ++++---- .../src/routes/documentation/functions/dynamic.mdx | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/apps/documentation/src/components/Sidebar/sidebarElements.ts b/apps/documentation/src/components/Sidebar/sidebarElements.ts index 530c80a8..c27ad0b5 100644 --- a/apps/documentation/src/components/Sidebar/sidebarElements.ts +++ b/apps/documentation/src/components/Sidebar/sidebarElements.ts @@ -190,13 +190,13 @@ export const sidebarElements: Array = [ children: [ { type: 'element', - label: 'dynamic', - href: '/documentation/functions/dynamic', + label: 'useRouter', + href: '/documentation/functions/use-router', }, { type: 'element', - label: 'useRouter', - href: '/documentation/functions/use-router', + label: 'dynamic', + href: '/documentation/functions/dynamic', }, ], }, diff --git a/apps/documentation/src/routes/documentation/functions/dynamic.mdx b/apps/documentation/src/routes/documentation/functions/dynamic.mdx index d49276f9..ef8e0f39 100644 --- a/apps/documentation/src/routes/documentation/functions/dynamic.mdx +++ b/apps/documentation/src/routes/documentation/functions/dynamic.mdx @@ -12,6 +12,8 @@ import Breadcrumbs from '@/components/Breadcrumbs' # dynamic +## Overview + Tuono supports lazy loading through the `dynamic` function, which uses `Suspense` and `React.lazy` to load components lazily with fallback support. Lazy loading helps reduce the amount of JavaScript required for the initial page render by deferring the loading of components and libraries until they are needed.