Form.getRegistry is now the buildRegistry export
Detect
Form.getRegistry(in your code.- Type checker:
Property 'getRegistry' does not exist on type '<T = unknown, S extends StrictRJSFSchema = StrictRJSFSchema, F extends FormContextType = object>(props: FormProps<T, S, F>) => Element'.(TS2339) on that call.
Change
getRegistry() was a static on the Form class. It is now buildRegistry(), exported from @rjsf/core, and it takes the same arguments:
-import Form from '@rjsf/core';
+import { buildRegistry } from '@rjsf/core';
-const registry = Form.getRegistry(props, schema, schemaUtils);
+const registry = buildRegistry(props, schema, schemaUtils);
Most code never needs it. Inside a field, widget or template, use the registry prop you already receive. It is the registry the Form rendered with, including its real schemaUtils.
To build a registry for a test, use getTestRegistry() from @rjsf/core/testing, see getTestRegistry moved to @rjsf/core/testing. For the core component dictionaries alone, use generateTheme(), see getDefaultRegistry is removed.
Verify
- The type checker no longer reports
getRegistryonForm. - The registry your code builds holds the same fields, widgets and templates as before.
Also read: