R
R
RomanSS2016-12-13 23:20:13
React
RomanSS, 2016-12-13 23:20:13

Is it possible to access the state of a component in redux actions?

Tell me, is it possible to somehow access the state of the component and change its value from the file where actions are stored in redux?
The essence of the problem, I make the form component so as not to dispatch every change in the input of the input field, I do it all not in the store, but in the state of the component. I send the form itself through redux actions. How can you change the state in the action so as not to litter the store with unnecessary data?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
KnightForce, 2017-05-15
@KnightForce

There is a form and its components - collect all changes in the state of the form, and then the entire dispatch pool.
Children can change the parent's state by passing a function.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question