Skip to content
Block Kit for React
Esc
↑↓navigate↵open⌘Jpreview
On this page

Fallback canary

How this renderer falls back for a block type it doesn't recognize, and the synthetic block used to test that path.

Slack Block Kit has a fallback convention: when a client doesn’t recognize a block’s type, it can render that block’s producer-supplied fallback array in its place instead of dropping the content. fallback_canary is a synthetic block type this library ships to exercise that path in tests and demos. It isn’t a block Slack itself sends. Point any real, unrecognized block at a fallback array and this renderer handles it the same way.

Your AppAPP

Fallback demo

Your client does not recognize this block, so it is showing the producer-supplied fallback instead of dropping the content.
Rendered via the fallback convention

Fields

PropType
typestring

Always `fallback_canary`.

Typestring
fallbackBlock[]

Blocks to render in place of this one. Slack renders the whole list inside the single wrapper it gave the unknown block, which is a flex row, so the fallback blocks sit side by side rather than stacking vertically.

TypeBlock[]

This isn’t a standard Block Kit block type. It’s a test fixture for the fallback mechanism itself. When this library encounters a block type it doesn’t have a component for, it looks for a fallback array on that block and renders those blocks instead of showing nothing.

Examples

Unknown block with a fallback

The example above simulates what happens when your app sends a block type this renderer (or a Slack client) doesn’t know about yet, but included a fallback for older clients.

Was this page helpful?