proxy-based Twister client written with react-js
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

17 lines
546 B

module.exports = AppSettingsMixin = {
getInitialState: function() {
this.appSettings = JSON.parse(localStorage.getItem("twister-react-settings"));
},
componentDidMount: function() {
window.addEventListener("appsettingschanged", this.onappsettingschanged);
},
componentWillUnmount: function() {
window.removeEventListener("appsettingschanged", this.onappsettingschanged);
},
onappsettingschanged: function() {
this.setState({appSettings: JSON.parse(localStorage.getItem("twister-react-settings"))});
}
};