Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 482
Jane Fred Avatar asked Sep 06 '18 05:09

Jane Fred


1 Answers

pristine means that no fields in the form have been modified yet. Perhaps you won't be able to find an exact definition of it in docs, but there is 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.

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

Here is an article about Redux Form which you might find helpful: https://alligator.io/redux/redux-form/

like image 62
Poger Avatar answered Sep 22 '22 20:09

Poger