You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update quick-start documentation for React forms (#26)
- Clarified that no external form library is required for the first form using FormFactory.
- Updated component specifications to include optional props for `components`, `customComponents`, and `renderers`.
- Enhanced the examples section with a minimal example demonstrating default usage of FormFactory.
- Added new components like `FormSectionGroup` and `FormSectionGroupContainer` to improve form structure.
- Refactored `FormContainer` to utilize `useScheptaFormAdapter` for form submission handling.
- Updated the documentation in English, Spanish, and Portuguese to reflect these changes.
FormFactory uses native React state by default, so **no form library is required** for your first form. To integrate with React Hook Form or Formik later, see the [React Showcase](/en-US/showcases/react) for examples.
27
+
29
28
## Setting Up the Provider
30
29
31
30
The `ScheptaProvider` is the central configuration point for your application. It manages global component registrations, middleware, and context that all factories can access.
@@ -56,7 +55,9 @@ function App() {
56
55
57
56
| Prop | Type | Description |
58
57
|------|------|-------------|
59
-
|`components`|`Record<string, ComponentSpec>`| Global component registry |
58
+
|`components`|`Record<string, ComponentSpec>`| Global component registry (optional) |
59
+
|`customComponents`|`Record<string, ComponentSpec>`| Custom components keyed by schema key (optional) |
60
+
|`renderers`|`Partial<Record<ComponentType, RendererFn>>`| Custom renderers per component type (optional) |
60
61
|`middlewares`|`Middleware[]`| Global middleware stack |
You can use `x-component-props` or `x-ui` for field labels and placeholders. The `$schema` property is optional (useful for IDE validation when working inside the monorepo).
0 commit comments