reflex-dev/reflex · error · TypeError
`{definition.python_name}` is missing required prop `{param.
Error message
`{definition.python_name}` is missing required prop `{param.name}`. What it means
A memoized function component invoked via `.call()` (or `functools.partial`) at runtime is missing a prop that has no default value. Reflex inspects the function's signature and requires every parameter without a default to be supplied.
Source
Thrown at packages/reflex-base/src/reflex_base/components/memo.py:1570
)
raise TypeError(msg)
# Bind declared props before collecting any rest props.
explicit_params = [
param
for param in definition.params
if param.kind not in (MemoParamKind.REST, MemoParamKind.CHILDREN)
]
explicit_values = {}
remaining_props = kwargs.copy()
for param in explicit_params:
if param.name in remaining_props:
explicit_values[param.name] = remaining_props.pop(param.name)
elif param.default is not inspect.Parameter.empty:
explicit_values[param.name] = param.default
else:
msg = f"`{definition.python_name}` is missing required prop `{param.name}`."
raise TypeError(msg)
# Reject unknown props unless a rest prop is declared.
if remaining_props and rest_param is None:
unexpected_prop = next(iter(remaining_props))
msg = (
f"`{definition.python_name}` does not accept prop `{unexpected_prop}`. "
"Only declared props may be passed when no `rx.RestProp` is present."
)
raise TypeError(msg)
# Return ordered explicit args when no packed props object is needed.
if children_param is None and rest_param is None:
return tuple(explicit_values[param.name] for param in explicit_params)
# Build the props object passed to the imported FunctionVar.
children_value: Any | None = None
if children_param is not None:
from reflex_components_core.base.fragment import FragmentView on GitHub (pinned to 45b8ed5ab7)
Solutions
- Add the missing keyword argument shown in the message to the `.call()` invocation
- Give the parameter a default value in the memo function definition if the prop is optional
- Check for typos in prop names at the call site
Example fix
// before @rx.memo def badge(label: str, tone: str) -> rx.Component: ... badge.call(label="hi") // after badge.call(label="hi", tone="info")
Defensive patterns
Strategy: validation
Validate before calling
import inspect
def check_memo_call(fn, **props):
sig = inspect.signature(fn)
for name, p in sig.parameters.items():
if p.default is inspect.Parameter.empty and name not in props:
raise ValueError(f"missing required prop {name!r}")
return props
badge.call(**check_memo_call(badge, label="hi")) Prevention
- Keep prop names in sync with the memo signature; rely on IDE/type checkers
- Prefer giving optional params defaults so only truly required props raise
- Write a tiny unit test per memo asserting required props are passed at each call site
When it happens
Trigger: Calling `my_memo.call()` without a keyword argument for a parameter declared without a default (e.g. `def item(x: int)` called as `item.call()`), or misspelling the prop name so the required one never gets bound.
Common situations: Typos in prop names (e.g. `colr=` vs `color=`), refactoring a memo signature to add a required parameter while old call sites are not updated, or conditionally building the props dict and forgetting a branch.
Understand the failure class
Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.
Related errors
- `{definition.python_name}` does not accept prop `{unexpected
- `{definition.python_name}` does not accept prop `{unknown[0]
- `@rx.memo` does not support `*args` in `{fn_name}`.
- `@rx.memo` does not support `**kwargs` in `{fn_name}`.
- `@rx.memo` does not support positional-only parameters in `{
AI-assisted analysis of reflex-dev/reflex@45b8ed5ab7 (2026-08-28).
Data as JSON: /api/errors/6fa31551d6aad8e9.
Report an issue: GitHub.