Answer the question
In order to leave comments, you need to log in
How to synchronously deliver data to redux?
const Parent = (props) => {
<Child/> // тут дочерний со своим состоянием
<button className="parent-submit" onClick={() => postData()}/>
}
const Child = () => {// как доставить state в Redux по клику на .parent-submit
const [state, setState] = useState({})
}
const postData = () => async (dispatch, getState) => {
const {base} = getState();
const {data} = base;
axios.post(data)
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question