js-localstorage-change-detector
A javascript library which watches all keys or particular keys in the local storage . If it detects any change in the keys , It will execute the callback in the local tab specified by us
Install
1.Using CDN. include the following cdn in the script tag in the HTML.
<html> <head> <script src="https://raw.githack.com/ashwinKumar0505/js-localstorage-change-detector/master/index.js" type="text/javascript"></script> </head> <body> </body></html>
2.Using npm to install the package
npm install --save js-localstorage-change-detector
; const App = { lsChangeDetector; return <div></div>;};
Basic Usage
1.To make the lsChangeDetector to watch all the keys and execute a call back if any of the keys changed.
; const App = { lsChangeDetector; return <div></div>;};
2.To make the lsChangeDetector to watch a single key and execute a call back if that key is alone changed.
; const App = { lsChangeDetector; return <div></div>;};
3.To make the lsChangeDetector to watch particular number of keys and execute a callback if any of those keys changes.
; const App = { lsChangeDetector; return <div></div>;};