how to remove session data on tab close in redux\

JavaScript
window.onbeforeunload = function() {
   localStorage.clear();
}
Source

Also in JavaScript: