mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-22 03:07:51 +00:00
Immediately save brew to localstorage upon page load
This commit is contained in:
@@ -84,6 +84,11 @@ const NewPage = createClass({
|
||||
},
|
||||
|
||||
componentDidMount : function() {
|
||||
localStorage.setItem(BREWKEY, this.state.brew.text);
|
||||
localStorage.setItem(STYLEKEY, this.state.brew.style);
|
||||
localStorage.setItem(METAKEY, JSON.stringify({
|
||||
'renderer' : this.state.brew.renderer
|
||||
}));
|
||||
document.addEventListener('keydown', this.handleControlKeys);
|
||||
},
|
||||
componentWillUnmount : function() {
|
||||
|
||||
Reference in New Issue
Block a user