form-hook-kit 1.2.2 → 1.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +54 -0
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -176,6 +176,60 @@ export default function App() {
176
176
 
177
177
  ---
178
178
 
179
+ ## Comprehensive Demo Applications
180
+
181
+ We provide two extensive, production-ready demo applications that showcase all form-hook-kit features:
182
+
183
+ ### React Web Registration Demo (`examples/react-registration-demo/`)
184
+
185
+ A full-featured React web application demonstrating:
186
+
187
+ - **Complete Registration Form** - Multiple field types (text, email, password, number, URL, textarea, checkbox)
188
+ - **Yup Schema Validation** - Custom error messages, required fields, format validation, length constraints
189
+ - **Individual Field Components** - Isolated re-renders using `useFormField` hook
190
+ - **Performance Monitoring** - Real-time metrics with `useFormPerformance` hook
191
+ - **DevTools Integration** - Visual UI panel for debugging form state
192
+ - **Configurable Validation Debouncing** - Adjustable delay slider (0-1000ms)
193
+ - **Modern Stack** - Vite, React 19, TypeScript, full type safety
194
+
195
+ **Run the demo:**
196
+ ```bash
197
+ cd examples/react-registration-demo
198
+ npm install
199
+ npm run dev
200
+ ```
201
+
202
+ ### React Native Registration Demo (`examples/react-native-registration-demo.tsx`)
203
+
204
+ A comprehensive React Native application demonstrating:
205
+
206
+ - **Complete Registration Form** - Multiple field types (text, email, password, phone, number, textarea, checkbox)
207
+ - **Yup Schema Validation** - Custom error messages, cross-field validation (password confirmation), format validation
208
+ - **Individual Field Components** - Isolated re-renders using `useFormField` hook
209
+ - **Performance Monitoring** - Real-time metrics with `useFormPerformance` and `useValidationPerformance` hooks
210
+ - **DevTools Integration** - Console mode for React Native debugging
211
+ - **React Native-Specific Features**:
212
+ - `KeyboardAvoidingView` for keyboard handling
213
+ - `SafeAreaView` for safe area insets
214
+ - Platform-specific styling (iOS/Android)
215
+ - Phone number formatting with custom formatter
216
+ - Password visibility toggle
217
+ - Focus management with field refs
218
+ - **Advanced Features**:
219
+ - Manual validation examples
220
+ - Multiple values update (reset form, fill sample data)
221
+ - Form values and errors display
222
+ - Configurable validation debouncing (300ms default)
223
+
224
+ **Use the demo:**
225
+ 1. Copy `examples/react-native-registration-demo.tsx` to your React Native app's `App.tsx`
226
+ 2. Install dependencies: `npm install form-hook-kit yup`
227
+ 3. Run: `npx react-native run-ios` or `npx react-native run-android`
228
+
229
+ Both demos serve as excellent references for learning form-hook-kit capabilities and as production-ready starting points for your own forms.
230
+
231
+ ---
232
+
179
233
  ## API Reference
180
234
 
181
235
  For complete API documentation, advanced usage, React Native examples, and performance optimization, see [USAGE.md](./USAGE.md).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "form-hook-kit",
3
- "version": "1.2.2",
3
+ "version": "1.2.4",
4
4
  "description": "A type-safe form management library for React and React Native with hooks-based API, Yup validation, and 100% test coverage",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.esm.js",