user image

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

Module not found: Can't resolve 'swiper' in Reactjs [Solved]
Publish date: 2021-10-03 | Comments: 1

Tag: React js

Best way to update the state in one class component from the redux store?
Publish date: 2022-03-30 | Comments: 3

Tag: React js

React Component displaying a list of lines
Publish date: 2022-03-19 | Comments: 3

Tag: React js

How to use SetFieldValue from outside render function? Formik
Publish date: 2021-07-03 | Comments: 2

Tag: React js

React usestate array map() is not working
Publish date: 2022-04-22 | Comments: 3

Tag: React js

npm install @mui/material returns error
Publish date: 2022-04-02 | Comments: 1

Tag: React js