D
D
Dan2021-04-17 13:19:32
React
Dan, 2021-04-17 13:19:32

It is necessary to block the button while the request is in progress, how to do it in this case?

disabled={state.is_disabled}
/>

) => {
event.preventDefault();

searchProduct(state)
}}>Search Product

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
GF, 2021-04-17
@fomenkogregory

Before the request, set the isLoading flag to true, when the response came or the error, set it to false

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question