| title | DF0038: Invalid JSON-Render Element Props |
|---|---|
| description | JSON-render view "{id}" received invalid props on element "{key}": {issues} |
JSON-render view "
{id}" received invalid props on element "{key}":{issues}
@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.
createJsonRenderView(ctx, {
id: 'toolbar',
// ✗ throws DF0038 — `variant` is not a Button variant
spec: { root: 'a', elements: { a: { type: 'Button', props: { variant: 'nope' }, children: [] } } },
})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.
packages/json-render/src/node/create-view.ts—validateElementProps()throws this at ingress and onupdate.