Answer the question
In order to leave comments, you need to log in
UseSelector after doing redux action?
I execute a post request, write the response to state. After executing the request, you need to get the data in the react component.
const response = useSelector(state => state.products)
const handleSave = useCallback(async (productData, formData) => {
await dispatch(productActions.createProduct(productData))
response && await sendData(formData, response.data) // вот тут мне нужны данные c респонса
}, [])
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