reactjsreduxreact-reduxredux-form

What is 'pristine' and 'submitting' in reduxForm?


I was going through a simple piece of code in reduxForm. What is pristine and submitting? What is the purpose of these?


Solution

  • pristine means that no fields in the form have been modified yet. It is documented in "props" section in Redux Form documentation.

    There is also a similar terminology in Angular. You can find some details here or here.

    submitting, as the name suggests, means that the form is in process of submitting (see: documentation).

    Their typical usage is to disable the "submit" button in case when one of them is true.

    Here is an example in Redux Form documentation which you might find helpful: https://redux-form.com/7.4.2/examples/initializefromstate/