Skip to content

Make the request to continue fetching when the react app gets closed

Make the request to continue fetching and stores the data into local storage when the react app gets closed. To fix this issue background js and local storage are used with an attribute called status.

Both background js and react app runs independently but they use the same local storage.

  1. whenever the extension icon clicked it gets the current tab URL and checks it in the local storage if the URL founds it just directly gets the value and displays it on the app. but if not found it sets the URL with status as pending and displays the loading spinner. and loops through

  2. The background js checks the local storage for every 2seconds for the URL with status pending, if it found some, then it gets that URL and calls the rest API, then when the data(value) retrieved it stores the data in the local storage and loops through again for checking status.

Note: directly calling backend through grpc is now removed, due to the background js(there is no way to make grpc calling in pure js means without npm)

Closes #11 (closed)

Edited by bulidiriba

Merge request reports