Schema State Hooks
The View Builder package provides React hooks for managing view schema state. These hooks enable components to access and modify the schema, validate it, and persist it to storage.Features
- Centralized State Management: Single source of truth for schema data
- Schema Validation: Validate schemas against specifications
- Persistence: Save and load schemas from storage
- Field Management: Add, update, and remove fields
- Type Safety: TypeScript definitions for all schema types
useSchemaState Hook
TheuseSchemaState
hook provides access to the schema state and operations:
SchemaProvider Component
TheSchemaProvider
component provides the schema state context to its children: