Skip to content

rendererProp silently no-ops on a misspelled / unregistered renderer id #82

Description

@Stvad

Problem

useRenderer reads rendererProp and only honors it via if (rendererKey && registry[rendererKey]) (src/hooks/useRendererRegistry.tsx:26). When the prop names a renderer id that isn't registered (typo, plugin not loaded, renderer renamed), the lookup silently fails and resolution falls through to the canRender predicate sort. The user's explicit override is lost with no signal.

Current state (verified)

src/hooks/useRendererRegistry.tsx:26-28if (rendererKey && registry[rendererKey]) { return registry[rendererKey] } then proceeds to alternatives with no console.warn and no placeholder.

Fix shape

When rendererKey is set but absent from the registry, console.warn with the offending id + the available ids, and either (a) render a "renderer not found" placeholder so the lost override is visible, or (b) fall through with the warning. Pick (b) for now — less disruptive — but at least surface it. Independent of any larger renderer-resolution redesign; cheap fix.

Triaged from docs/follow-ups.md (P3). Good first issue — small, self-contained.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low — deferred until a measured trigger firesbugSomething isn't workinggood first issueGood for newcomers

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions