{"action":"created","issue":{"url":"https://api.github.com/repos/zeit/next.js/issues/5162","repository_url":"https://api.github.com/repos/zeit/next.js","labels_url":"https://api.github.com/repos/zeit/next.js/issues/5162/labels{/name}","comments_url":"https://api.github.com/repos/zeit/next.js/issues/5162/comments","events_url":"https://api.github.com/repos/zeit/next.js/issues/5162/events","html_url":"https://github.com/zeit/next.js/issues/5162","id":360150679,"node_id":"MDU6SXNzdWUzNjAxNTA2Nzk=","number":5162,"title":"How to save state of Redux on LocalStorage?","user":{"login":"MontoyaAndres","id":15065852,"node_id":"MDQ6VXNlcjE1MDY1ODUy","avatar_url":"https://avatars3.githubusercontent.com/u/15065852?v=4","gravatar_id":"","url":"https://api.github.com/users/MontoyaAndres","html_url":"https://github.com/MontoyaAndres","followers_url":"https://api.github.com/users/MontoyaAndres/followers","following_url":"https://api.github.com/users/MontoyaAndres/following{/other_user}","gists_url":"https://api.github.com/users/MontoyaAndres/gists{/gist_id}","starred_url":"https://api.github.com/users/MontoyaAndres/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MontoyaAndres/subscriptions","organizations_url":"https://api.github.com/users/MontoyaAndres/orgs","repos_url":"https://api.github.com/users/MontoyaAndres/repos","events_url":"https://api.github.com/users/MontoyaAndres/events{/privacy}","received_events_url":"https://api.github.com/users/MontoyaAndres/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-09-14T04:15:24Z","updated_at":"2018-09-14T09:50:09Z","closed_at":"2018-09-14T09:49:53Z","author_association":"NONE","body":"I want to save the state of redux on LocalStorage, I've try the package called redux-localstorage, like this:\r\n\r\n```\r\nimport { createStore, applyMiddleware, compose } from \"redux\";\r\nimport { composeWithDevTools } from \"redux-devtools-extension\";\r\nimport persistState from \"redux-localstorage\";\r\nimport adapter from \"redux-localstorage/lib/adapters/localStorage\";\r\nimport thunk from \"redux-thunk\";\r\n\r\nimport reducers from \"./reducers\";\r\n\r\nexport default function initializeStore(initialState = {}) {\r\n\tconst storage = adapter(window.localStorage);\r\n\r\n\tconst enhancer = compose(\r\n\t\tcomposeWithDevTools(applyMiddleware(thunk)),\r\n\t\tpersistState(storage, \"state\")\r\n\t);\r\n\r\n\tconst store = createStore(reducers, initialState, enhancer);\r\n\r\n\treturn store;\r\n}\r\n```\r\n\r\nBut I have one error, which is that the window does not exists...\r\n"},"comment":{"url":"https://api.github.com/repos/zeit/next.js/issues/comments/421298983","html_url":"https://github.com/zeit/next.js/issues/5162#issuecomment-421298983","issue_url":"https://api.github.com/repos/zeit/next.js/issues/5162","id":421298983,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMTI5ODk4Mw==","user":{"login":"timneutkens","id":6324199,"node_id":"MDQ6VXNlcjYzMjQxOTk=","avatar_url":"https://avatars2.githubusercontent.com/u/6324199?v=4","gravatar_id":"","url":"https://api.github.com/users/timneutkens","html_url":"https://github.com/timneutkens","followers_url":"https://api.github.com/users/timneutkens/followers","following_url":"https://api.github.com/users/timneutkens/following{/other_user}","gists_url":"https://api.github.com/users/timneutkens/gists{/gist_id}","starred_url":"https://api.github.com/users/timneutkens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timneutkens/subscriptions","organizations_url":"https://api.github.com/users/timneutkens/orgs","repos_url":"https://api.github.com/users/timneutkens/repos","events_url":"https://api.github.com/users/timneutkens/events{/privacy}","received_events_url":"https://api.github.com/users/timneutkens/received_events","type":"User","site_admin":false},"created_at":"2018-09-14T09:50:09Z","updated_at":"2018-09-14T09:50:09Z","author_association":"COLLABORATOR","body":"Also, please follow the issue template."}}
{"actor":{"display_login":"timneutkens"}}