From 17b2f2e90328b9388175d1047fa01bf6257d584c Mon Sep 17 00:00:00 2001 From: Fringg Date: Mon, 23 Feb 2026 17:15:03 +0300 Subject: [PATCH] perf: extract Twemoji options to module-level const Prevent MutationObserver re-initialization on every render by moving the options object out of JSX (was creating a new object reference on each render of AppWithNavigator). --- src/AppWithNavigator.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/AppWithNavigator.tsx b/src/AppWithNavigator.tsx index 6f6dfeb..bd5b6f2 100644 --- a/src/AppWithNavigator.tsx +++ b/src/AppWithNavigator.tsx @@ -16,6 +16,8 @@ import { ToastProvider } from './components/Toast'; import { TooltipProvider } from './components/primitives/Tooltip'; import { isInTelegramWebApp } from './hooks/useTelegramSDK'; +const TWEMOJI_OPTIONS = { className: 'twemoji', folder: 'svg', ext: '.svg' } as const; + /** * Manages Telegram BackButton visibility based on navigation location. * Shows back button on non-root routes, hides on root. @@ -77,7 +79,7 @@ export function AppWithNavigator() { - +