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

TypeError: Super expression must either be null or a function
Publish date: 2022-03-13 | Comments: 2

Tag: React js

import link as router link from 'react-router-dom' Reactjs
Publish date: 2021-09-30 | Comments: 3

Tag: React js

useStyles Invalid hook call class component
Publish date: 2022-02-10 | Comments: 2

Tag: React js

Warning: React.jsx: type is invalid
Publish date: 2022-05-06 | Comments: 1

Tag: React js

React.Fragment. React.Fragment can only have key props and children
Publish date: 2022-08-06 | Comments: 2

Tag: React js

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

Tag: React js