Skip to content

Latest commit

 

History

History
30 lines (20 loc) · 1.11 KB

File metadata and controls

30 lines (20 loc) · 1.11 KB
title DF0038: Invalid JSON-Render Element Props
description JSON-render view "{id}" received invalid props on element "{key}": {issues}

Message

JSON-render view "{id}" received invalid props on element "{key}": {issues}

Cause

@devframes/json-render validates every element's props against the base catalog's per-component schema at spec ingress (createJsonRenderView / view.update). An element whose props don't match its component's schema is rejected here.

Example

createJsonRenderView(ctx, {
  id: 'toolbar',
  // ✗ throws DF0038 — `variant` is not a Button variant
  spec: { root: 'a', elements: { a: { type: 'Button', props: { variant: 'nope' }, children: [] } } },
})

Fix

Match the element props to the base catalog's prop schema for that component. Dynamic $state / $bindState expressions are accepted wherever a scalar prop is expected.

Source