inputlogic / pwa-starter

A starting point for Preact based PWAs (WIP)
MIT License
3 stars 0 forks source link

Document when to exclude initial state from snap preloaded state #81

Closed weslord closed 4 years ago

weslord commented 4 years ago
// Tell react-snap how to save Redux state
window.snapSaveState = () => ({
  __PRELOADED_STATE__: W.without(['currentPath', 'currentRoute', 'token'], store.getState())
})

I'm pretty sure at some point in the past I had to add a key to this list to get my app to work properly, but I can't remember which app or under what particular circumstances. I do know it took a little while to figure out the problem.

Would be nice to add a brief comment explaining what this does and when/if you'd need to add to this.