Skip to content

Commit

Permalink
fix: make textinstance no-op instead of warn (#3366)
Browse files Browse the repository at this point in the history
  • Loading branch information
Amatewasu authored Oct 1, 2024
1 parent 4157481 commit 3eff722
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/fiber/src/core/renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -301,9 +301,8 @@ function createRenderer<TCanvas>(_roots: Map<TCanvas, Root>, _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'],
Expand Down

0 comments on commit 3eff722

Please sign in to comment.