Cache articles in memory for speed

This commit is contained in:
Tanner
2019-10-18 21:26:22 +00:00
parent b09599aa5f
commit 5de8631115
4 changed files with 33 additions and 6 deletions
+1
View File
@@ -33,6 +33,7 @@ class Feed extends React.Component {
.then(result => {
localForage.setItem(x.id, result.story)
.then(console.log('preloaded', x.id, x.title));
this.props.updateCache(x.id, result.story);
}, error => {}
);
});