From 213d2c3e625ef9ae52820874d2ce9273fda98ee7 Mon Sep 17 00:00:00 2001 From: Alexis Delrieu Date: Fri, 27 Sep 2024 14:01:51 +0000 Subject: [PATCH] fix: make textinstance no-op instead of warn --- packages/fiber/src/core/renderer.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/fiber/src/core/renderer.ts b/packages/fiber/src/core/renderer.ts index 3149eae9d5..45d5c55cc9 100644 --- a/packages/fiber/src/core/renderer.ts +++ b/packages/fiber/src/core/renderer.ts @@ -301,9 +301,8 @@ function createRenderer(_roots: Map, _getEventPriority?: }) } - // Don't handle text instances, warn on undefined behavior - const handleTextInstance = () => - console.warn('Text is not allowed in the R3F tree! This could be stray whitespace or characters.') + // Don't handle text instances, make it no-op + const handleTextInstance = () => {} const reconciler = Reconciler< HostConfig['type'],