Skip to content

fix: render Canvas fallback when renderer setup fails#3761

Open
raashish1601 wants to merge 1 commit into
pmndrs:masterfrom
raashish1601:codex/3757-visible-canvas-fallback
Open

fix: render Canvas fallback when renderer setup fails#3761
raashish1601 wants to merge 1 commit into
pmndrs:masterfrom
raashish1601:codex/3757-visible-canvas-fallback

Conversation

@raashish1601
Copy link
Copy Markdown

@raashish1601 raashish1601 commented May 14, 2026

Summary

Fixes #3757.

When renderer setup fails before the reconciler tree renders, the Canvas fallback was left as children of <canvas>, which browsers do not display. This catches async renderer setup failures, unmounts the failed root, and renders the provided fallback as visible DOM instead of leaving a blank canvas.

Validation

  • corepack yarn jest packages/fiber/tests/canvas.test.tsx --runInBand
  • .\node_modules\.bin\eslint.cmd packages/fiber/src/web/Canvas.tsx packages/fiber/tests/canvas.test.tsx
  • corepack yarn prettier --check packages/fiber/src/web/Canvas.tsx packages/fiber/tests/canvas.test.tsx
  • corepack yarn typecheck
  • corepack yarn validate
  • git diff --check origin/master...HEAD

@codesandbox-ci
Copy link
Copy Markdown

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 290018f:

Sandbox Source
example Configuration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Canvas fallback element is not visible

1 participant