Redux crushes previous states

0

I have a record in native react that has several inputs, that collect the information validate it and send it to the global store and then send it to the bbdd.

The issue is that in addition to the inputs, I have a datepicker and a dropdown that are two child components within the record.

I have connected the dropdown to redux with its action and included the swtich 'user' of the reducer, it collects the information well and passes it to the parent component through a props.

The problem is that when I select date with the datePicker about write the state of the dropdown and I can not pass it as a prop to the record ....

I do not know if it's a structural problem of mine, because it's the first project I do with Redux.

Thanks in advance

    
asked by jcanton 23.11.2018 в 14:22
source

1 answer

0

Well, you should not spend anything with the props. Then you define the state depending on the form. Then when calling the action it automatically updates, then with an effect saves in BD

    
answered by 03.12.2018 / 20:13
source