reactive-storage
This is a storage that uses observer design pattern to call every listener after updating the storage.
Simple example. Using with React JS
npm install real-time --save
;;; Component { superprops; thisstate = updateCounter: 0 thisincrement = thisincrement; thissetUsername = thissetUsername; thiscomponentWillMount = thiscomponentWillMount; } { this } { event; let value = thisrefsinpvalue; RStorage; } { RStorage; // if you want to clean localStorage after reloading RStorage; } { let username = RStorage; return <div> <h1>username ? username : "empty value"</h1> <h4>thisstateupdateCounter</h4> <input type="text" onChange=thissetUsername ref="inp"></input> <button onClick=thissetUsername>Set username</button> </div> }