{"action":"created","issue":{"url":"https://api.github.com/repos/Yomguithereal/baobab/issues/166","labels_url":"https://api.github.com/repos/Yomguithereal/baobab/issues/166/labels{/name}","comments_url":"https://api.github.com/repos/Yomguithereal/baobab/issues/166/comments","events_url":"https://api.github.com/repos/Yomguithereal/baobab/issues/166/events","html_url":"https://github.com/Yomguithereal/baobab/issues/166","id":67506517,"number":166,"title":"Timestamped history - history replay","user":{"login":"pindamonhangaba","id":1778376,"avatar_url":"https://avatars.githubusercontent.com/u/1778376?v=3","gravatar_id":"","url":"https://api.github.com/users/pindamonhangaba","html_url":"https://github.com/pindamonhangaba","followers_url":"https://api.github.com/users/pindamonhangaba/followers","following_url":"https://api.github.com/users/pindamonhangaba/following{/other_user}","gists_url":"https://api.github.com/users/pindamonhangaba/gists{/gist_id}","starred_url":"https://api.github.com/users/pindamonhangaba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pindamonhangaba/subscriptions","organizations_url":"https://api.github.com/users/pindamonhangaba/orgs","repos_url":"https://api.github.com/users/pindamonhangaba/repos","events_url":"https://api.github.com/users/pindamonhangaba/events{/privacy}","received_events_url":"https://api.github.com/users/pindamonhangaba/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Yomguithereal/baobab/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-04-10T04:27:51Z","updated_at":"2015-04-14T19:06:52Z","closed_at":null,"body":"I was thinking on a use case where I want to have two trees, one for application state and another for the ui state. If I want to later replay a users interaction I'd need to be able to sync the steps on each tree.\r\n\r\nAlso, having a replay system would be useful, even if read-only. Something like:\r\n\r\n```\r\nvar replay = new BaobabReplay({appState: appStateHistoryObj, uiState: uiStateHistoryObj});\r\nreplay.trees; // returns {appState: Baobab, uiState: Baobab }\r\n\r\n<Component appCursor={replay.trees.appState} uiCursor={replay.trees.uiState}>\r\n\r\n// compares the next history entry datestamp of all trees and determines which get applied\r\nreplay.forward();\r\nreplay.backward();\r\n```\r\n\r\nNot sure how others are using baobab with React, but I don't like using a component's state, instead opting to use a cursor as state. So being able to record each components ui state changes, and later replay them seems like a good use case, even tough I haven't used baobab in production yet.\r\n"},"comment":{"url":"https://api.github.com/repos/Yomguithereal/baobab/issues/comments/93022134","html_url":"https://github.com/Yomguithereal/baobab/issues/166#issuecomment-93022134","issue_url":"https://api.github.com/repos/Yomguithereal/baobab/issues/166","id":93022134,"user":{"login":"tnrich","id":2730609,"avatar_url":"https://avatars.githubusercontent.com/u/2730609?v=3","gravatar_id":"","url":"https://api.github.com/users/tnrich","html_url":"https://github.com/tnrich","followers_url":"https://api.github.com/users/tnrich/followers","following_url":"https://api.github.com/users/tnrich/following{/other_user}","gists_url":"https://api.github.com/users/tnrich/gists{/gist_id}","starred_url":"https://api.github.com/users/tnrich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tnrich/subscriptions","organizations_url":"https://api.github.com/users/tnrich/orgs","repos_url":"https://api.github.com/users/tnrich/repos","events_url":"https://api.github.com/users/tnrich/events{/privacy}","received_events_url":"https://api.github.com/users/tnrich/received_events","type":"User","site_admin":false},"created_at":"2015-04-14T19:06:52Z","updated_at":"2015-04-14T19:06:52Z","body":"+1 for having an undo system that can act on cursors at any level within the tree. I was about to ask whether you would need to make two baobab trees to support undo-redo if you didn't want all of you data undone."}}