<commit_before># FAQ

## How does the `veasy` handle my state underneath

To follow the best practice, We treat your state as immutable data, so every time a field gets changed, a new state object for this field will be dispatched to the `update` method you passed to the `<Veasy>`, or the `validate()` method if you try to do everything by yourself.

## Will `veasy` update my state whenever there is a change

Not really, we will check `status`, `errorText` and `value`, if they are all the same, we won't trigger the update.

## How to customize the error text

You could, check this [section](/customize-error-text)

## What about I want to add my own initial state

Very easy. Check this [section](/customize-add)

## I have my own state for the field which want to add to the same state, how to do that

Very easy. Check this [section](/customize-reuse)

## How to collect all the values

Just call the `getFieldsValue()` function, check this [section](/collect-values)

## What about I want to collect some value from fields which not in the schema

We handle that case as well, check this [section](/collect-values)<commit_msg>Update the question<commit_after># FAQ

## How does the `veasy` handle my state underneath

To follow the best practice, We treat your state as immutable data, so every time a field gets changed, a new state object for this field will be dispatched to the `update` method you passed to the `<Veasy>`, or the `validate()` method if you try to do everything by yourself.

## Will `veasy` update my state whenever there is a change

Not really, we will check `status`, `errorText` and `value`, if they are all the same, we won't trigger the update.

## How to customize the error text

You could, check this [section](/customize-error-text)

## What about I want to add my own initial state

Very easy. Check this [section](/customize-add)

## I wanna put my own field state under the same name of `veasy` field state, how to do that

Very easy. Check this [section](/customize-reuse)

## How to collect all the values

Just call the `getFieldsValue()` function, check this [section](/collect-values)

## What about I want to collect some value from fields which not in the schema

We handle that case as well, check this [section](/collect-values)
{'fraction_non_alphanumeric': 0.07982456140350877, 'fraction_numerical': 0.0, 'mean_word_length': 4.304651162790698, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6455296', 'n_tokens_mistral': 629, 'n_tokens_neox': 611, 'n_words': 359}