{"action":"opened","issue":{"url":"https://api.github.com/repos/martyjs/marty-lib/issues/24","labels_url":"https://api.github.com/repos/martyjs/marty-lib/issues/24/labels{/name}","comments_url":"https://api.github.com/repos/martyjs/marty-lib/issues/24/comments","events_url":"https://api.github.com/repos/martyjs/marty-lib/issues/24/events","html_url":"https://github.com/martyjs/marty-lib/issues/24","id":91244060,"number":24,"title":"Clearing ES6 Stores doens't restore the initial state","user":{"login":"moretti","id":1186409,"avatar_url":"https://avatars.githubusercontent.com/u/1186409?v=3","gravatar_id":"","url":"https://api.github.com/users/moretti","html_url":"https://github.com/moretti","followers_url":"https://api.github.com/users/moretti/followers","following_url":"https://api.github.com/users/moretti/following{/other_user}","gists_url":"https://api.github.com/users/moretti/gists{/gist_id}","starred_url":"https://api.github.com/users/moretti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moretti/subscriptions","organizations_url":"https://api.github.com/users/moretti/orgs","repos_url":"https://api.github.com/users/moretti/repos","events_url":"https://api.github.com/users/moretti/events{/privacy}","received_events_url":"https://api.github.com/users/moretti/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-06-26T12:58:59Z","updated_at":"2015-06-26T12:58:59Z","closed_at":null,"body":"Hi, according to the docs, [`Store.clear`](http://martyjs.org/api/stores/index.html#clear) should replace the state with the initial state when called. \r\n\r\nThis works fine in classic mode because `Store.clear` internally calls `Store.getInitialState`. \r\nHowever in ES6 mode `Store.getInitialState` is not defined because the state is typically initialised in the class constructor and calling `Store.clear` simply sets the state to an empty object.\r\n\r\nI ended up using `getInitialState` in ES6 stores as temporary workaround, but it seems an anti-pattern. \r\n\r\nAny thoughts on this?"}}