{"action":"created","issue":{"url":"https://api.github.com/repos/acdlite/flummox/issues/102","labels_url":"https://api.github.com/repos/acdlite/flummox/issues/102/labels{/name}","comments_url":"https://api.github.com/repos/acdlite/flummox/issues/102/comments","events_url":"https://api.github.com/repos/acdlite/flummox/issues/102/events","html_url":"https://github.com/acdlite/flummox/issues/102","id":62612167,"number":102,"title":"Can't serialize my flux instance","user":{"login":"fkrauthan","id":1679841,"avatar_url":"https://avatars.githubusercontent.com/u/1679841?v=3","gravatar_id":"","url":"https://api.github.com/users/fkrauthan","html_url":"https://github.com/fkrauthan","followers_url":"https://api.github.com/users/fkrauthan/followers","following_url":"https://api.github.com/users/fkrauthan/following{/other_user}","gists_url":"https://api.github.com/users/fkrauthan/gists{/gist_id}","starred_url":"https://api.github.com/users/fkrauthan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fkrauthan/subscriptions","organizations_url":"https://api.github.com/users/fkrauthan/orgs","repos_url":"https://api.github.com/users/fkrauthan/repos","events_url":"https://api.github.com/users/fkrauthan/events{/privacy}","received_events_url":"https://api.github.com/users/fkrauthan/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-03-18T07:24:46Z","updated_at":"2015-03-18T19:20:16Z","closed_at":"2015-03-18T12:42:21Z","body":"I started using flummox today. But when I try to call `flux.serialize()` I just get a empty result back. I've debugged it and my flux instance contains a store with a state that contains an element.\r\n\r\nI've looked a little bit within the serialize call of Flux and found out that the Store doesn't have a serialize function. It stops here: `if (typeof serialize !== 'function')`.\r\n\r\nAny idea why? My store follows the basic example:\r\n\r\n````javascript\r\nimport { Store } from 'flummox';\r\n\r\nexport default class NavigationStore extends Store {\r\n\r\n  constructor(flux) {\r\n      super();\r\n\r\n      let navigationActionIds = flux.getActionIds('navigation');\r\n      this.register(navigationActionIds.changePath, this.handleChangePath);\r\n\r\n      this.state = {\r\n          path: '/'\r\n      };\r\n  }\r\n\r\n  handleChangePath({ newPath }) {\r\n      this.setState({\r\n          path: newPath\r\n      });\r\n  }\r\n\r\n  getPath() {\r\n      return this.state.path;\r\n  }\r\n\r\n}\r\n````\r\n\r\nAny ideas what I may miss? Right now I am using version `2.13.2`"},"comment":{"url":"https://api.github.com/repos/acdlite/flummox/issues/comments/83128074","html_url":"https://github.com/acdlite/flummox/issues/102#issuecomment-83128074","issue_url":"https://api.github.com/repos/acdlite/flummox/issues/102","id":83128074,"user":{"login":"acdlite","id":3624098,"avatar_url":"https://avatars.githubusercontent.com/u/3624098?v=3","gravatar_id":"","url":"https://api.github.com/users/acdlite","html_url":"https://github.com/acdlite","followers_url":"https://api.github.com/users/acdlite/followers","following_url":"https://api.github.com/users/acdlite/following{/other_user}","gists_url":"https://api.github.com/users/acdlite/gists{/gist_id}","starred_url":"https://api.github.com/users/acdlite/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acdlite/subscriptions","organizations_url":"https://api.github.com/users/acdlite/orgs","repos_url":"https://api.github.com/users/acdlite/repos","events_url":"https://api.github.com/users/acdlite/events{/privacy}","received_events_url":"https://api.github.com/users/acdlite/received_events","type":"User","site_admin":false},"created_at":"2015-03-18T19:20:16Z","updated_at":"2015-03-18T19:20:16Z","body":"Hmm, I can see the benefit of that. Rather than provide a SerializedStore class, though, I think it might be better to provide it as plugin/mixin. That way we don't encourage long inheritance chains (Store -> SerializedStore -> MyStore).\r\n\r\n```js\r\nfunction serializationPlugin(StoreClass) {\r\n  StoreClass.serialize = function(state) {...}\r\n  StoreClass.deserialize = function(state) {...}\r\n\r\n  return StoreClass;\r\n}\r\n\r\n// in your app's store modules\r\nclass MyStore extends Store {...}\r\nserializationPlugin(StoreClass);\r\n```\r\n\r\nI don't know if \"serializationPlugin\" is the right name for it, though."}}