nico
Published in : 2022-03-14

React how to display progression message on the ui with a long running ajax task on the back end?

React js

Hello all, 

I need to call for a long running task on the back end from axios with react.

I have a textarea on the front which will contain the progression messages.

How can I get the progression messages from the backend to the react frontend ?
For example the messages could contain:

- Search started

then

- Search started
- Search in  Progress
- Search Done

Do I need to add a timer which will call for one endpoint on the backend which will return the messages and update the react ui?
 

If you see a better solution, thank for your help.

Comments

There is no comments yet

Leave a comment

Join us

Join our community and get the chance to solve your code issues & share your opinion with us

Sign up Now

Related posts

How to get the selected object in "Autocomplete material ui"?
Publish date: 2021-12-22 | Comments: 3

Tag: React js

Unexpected mix of '&&' and '||' Reactjs
Publish date: 2021-10-30 | Comments: 0

Tag: React js

[solved] useEffect is repeating the request Reactjs
Publish date: 2022-04-07 | Comments: 2

Tag: React js

Could not be processed as an image because it has an invalid content type
Publish date: 2021-12-08 | Comments: 0

Tag: React js