Skip to content

Comments

feat(solid): add SolidJS bindings package and comprehensive examples#69

Open
kattsushi wants to merge 3 commits intolucas-barake:mainfrom
kattsushi:main
Open

feat(solid): add SolidJS bindings package and comprehensive examples#69
kattsushi wants to merge 3 commits intolucas-barake:mainfrom
kattsushi:main

Conversation

@kattsushi
Copy link

Description

This PR introduces full SolidJS support to the effect-form ecosystem. It adds a new @lucas-barake/effect-form-solid package with idiomatic SolidJS bindings and a dedicated examples/solid workspace containing 8 comprehensive example applications. This expansion allows SolidJS developers to leverage the same type-safe, Effect-powered form validation logic available to React users.

Changes

📦 New Package: @lucas-barake/effect-form-solid

  • Core Bindings: Implemented FormSolid components and hooks that integrate effect-form core logic with SolidJS reactivity (Signals, Stores).
  • Features:
    • Full support for validation modes (onChange, onBlur, onSubmit).
    • Auto-submit functionality with debouncing.
    • Fine-grained reactivity optimizations.
  • Testing: Added extensive test suite (>2000 lines) covering edge cases, race conditions, and integration with @solidjs/testing-library.

🌟 New Workspace: examples/solid

  • Added a complete demo application mirroring the React examples but built with SolidJS primitives.
  • 8 Interactive Examples:
    1. Basic Form: Standard login flow with Data.TaggedError handling.
    2. Validation Modes: Demonstration of validation timing strategies.
    3. Array Fields: Dynamic lists with add/remove/swap/move operations using <For>.
    4. Cross-Field Validation: Synchronous refinements (e.g., password confirmation).
    5. Async Validation: Integration with Effect services for server-side checks.
    6. Auto-Submit: Forms that save automatically on change/blur.
    7. Multi-Step Wizard: Composing complex forms from smaller schema parts using .merge().
    8. Revert Changes: Dirty state tracking and reversion logic.

🔧 Configuration & Fixes

  • Monorepo Setup:
    • Added examples/solid to pnpm-workspace.yaml.
    • Configured vite.config.ts and tsconfig.json for SolidJS compatibility (JSX preserve, alias resolution).
  • Build System:
    • Resolved baseUrl and main entry point issues in package.json for @effectify/solid-effect-atom.
    • Standardized test scripts across packages (vitest run).
    • Fixed cross-package import paths in examples.

Technical Details

  • Migration Strategy: Ported React hooks (useState, useEffect) to Solid primitives (createSignal, createEffect) while maintaining the same functional requirements.
  • Component Architecture: Used Solid's <Show> and <For> control flow components for efficient rendering.
  • Type Safety: Ensured strict TypeScript compliance across both the library and examples (allowImportingTsExtensions enabled for local dev).

Verification

  • pnpm build passes for all workspaces.
  • pnpm test passes for form-react and form-solid (100% success rate).
  • examples/solid builds successfully and runs in the browser.
  • examples/react remains unaffected and fully functional.

Andres Jimenez and others added 3 commits February 9, 2026 20:52
Introduce a new @lucas-barake/effect-form-solid package providing SolidJS
bindings for the Effect-powered form library. The package includes:

- Full integration with SolidJS reactive primitives
- Support for both manual and auto-submit form modes
- Comprehensive test suite covering debouncing, race conditions, and edge cases
- Proper TypeScript configuration with SolidJS JSX support
- Build configuration with Babel for SolidJS compatibility

The implementation reuses the core form logic from @lucas-barake/effect-form
while providing a SolidJS-specific API surface with components and hooks.
Add comprehensive example applications for both React and SolidJS frameworks to demonstrate the usage of the effect-form library. Each example includes:

- Complete project setup with Vite, TypeScript, and framework-specific configuration
- Eight interactive form examples covering basic forms, validation modes, array fields, cross-field validation, async validation, auto-submit, multi-step wizards, and revert changes functionality
- Shared CSS styling and reusable components
- Proper workspace configuration in pnpm-workspace.yaml
- Dependency management with workspace package references

The examples showcase the full capabilities of the form library including type-safe error handling, Effect services integration, and framework-specific implementations.
@lucas-barake
Copy link
Owner

Thanks for opening this! I'll take a look when I get some time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants