nico

14 Mar 2022

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

No Comments to show

© 2024 Copyrights reserved for web-brackets.com