@tanstack/preact-form 1.30.0 → 1.30.1

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.
@@ -1,5 +1,5 @@
1
1
  import { useMemo, useState } from 'preact/hooks'
2
- import { useStore } from '@tanstack/preact-store'
2
+ import { useSelector } from '@tanstack/preact-store'
3
3
  import { FormGroupApi, functionalUpdate } from '@tanstack/form-core'
4
4
  import { useIsomorphicLayoutEffect } from './useIsomorphicLayoutEffect'
5
5
  import type {
@@ -201,71 +201,71 @@ export function useFormGroup<
201
201
  setPrevOptions({ form: opts.form, name: opts.name })
202
202
  }
203
203
 
204
- const reactiveStateValue = useStore(
204
+ const reactiveStateValue = useSelector(
205
205
  formGroupApi.store,
206
206
  (state) => state.value,
207
207
  )
208
208
 
209
- const reactiveMetaIsTouched = useStore(
209
+ const reactiveMetaIsTouched = useSelector(
210
210
  formGroupApi.store,
211
211
  (state) => state.meta.isTouched,
212
212
  )
213
- const reactiveMetaIsBlurred = useStore(
213
+ const reactiveMetaIsBlurred = useSelector(
214
214
  formGroupApi.store,
215
215
  (state) => state.meta.isBlurred,
216
216
  )
217
- const reactiveMetaIsDirty = useStore(
217
+ const reactiveMetaIsDirty = useSelector(
218
218
  formGroupApi.store,
219
219
  (state) => state.meta.isDirty,
220
220
  )
221
- const reactiveMetaErrorMap = useStore(
221
+ const reactiveMetaErrorMap = useSelector(
222
222
  formGroupApi.store,
223
223
  (state) => state.meta.errorMap,
224
224
  )
225
- const reactiveMetaErrorSourceMap = useStore(
225
+ const reactiveMetaErrorSourceMap = useSelector(
226
226
  formGroupApi.store,
227
227
  (state) => state.meta.errorSourceMap,
228
228
  )
229
- const reactiveMetaIsValidating = useStore(
229
+ const reactiveMetaIsValidating = useSelector(
230
230
  formGroupApi.store,
231
231
  (state) => state.meta.isValidating,
232
232
  )
233
233
 
234
234
  // Submission lifecycle and aggregated validity now live on `state.meta`
235
235
  // (mirroring `FieldApi.state.meta`).
236
- const reactiveMetaIsSubmitting = useStore(
236
+ const reactiveMetaIsSubmitting = useSelector(
237
237
  formGroupApi.store,
238
238
  (state) => state.meta.isSubmitting,
239
239
  )
240
- const reactiveMetaIsSubmitted = useStore(
240
+ const reactiveMetaIsSubmitted = useSelector(
241
241
  formGroupApi.store,
242
242
  (state) => state.meta.isSubmitted,
243
243
  )
244
- const reactiveMetaSubmissionAttempts = useStore(
244
+ const reactiveMetaSubmissionAttempts = useSelector(
245
245
  formGroupApi.store,
246
246
  (state) => state.meta.submissionAttempts,
247
247
  )
248
- const reactiveMetaIsSubmitSuccessful = useStore(
248
+ const reactiveMetaIsSubmitSuccessful = useSelector(
249
249
  formGroupApi.store,
250
250
  (state) => state.meta.isSubmitSuccessful,
251
251
  )
252
- const reactiveMetaCanSubmit = useStore(
252
+ const reactiveMetaCanSubmit = useSelector(
253
253
  formGroupApi.store,
254
254
  (state) => state.meta.canSubmit,
255
255
  )
256
- const reactiveMetaIsValid = useStore(
256
+ const reactiveMetaIsValid = useSelector(
257
257
  formGroupApi.store,
258
258
  (state) => state.meta.isValid,
259
259
  )
260
- const reactiveMetaIsFieldsValid = useStore(
260
+ const reactiveMetaIsFieldsValid = useSelector(
261
261
  formGroupApi.store,
262
262
  (state) => state.meta.isFieldsValid,
263
263
  )
264
- const reactiveMetaIsFieldsValidating = useStore(
264
+ const reactiveMetaIsFieldsValidating = useSelector(
265
265
  formGroupApi.store,
266
266
  (state) => state.meta.isFieldsValidating,
267
267
  )
268
- const reactiveMetaIsGroupValid = useStore(
268
+ const reactiveMetaIsGroupValid = useSelector(
269
269
  formGroupApi.store,
270
270
  (state) => state.meta.isGroupValid,
271
271
  )