{"id":16322124,"url":"https://github.com/1999/terminal-dispatch-state","last_synced_at":"2026-05-05T13:35:32.572Z","repository":{"id":35122053,"uuid":"209430265","full_name":"1999/terminal-dispatch-state","owner":"1999","description":"Re-render terminal contents by updating the state.","archived":false,"fork":false,"pushed_at":"2022-03-24T16:58:29.000Z","size":59,"stargazers_count":2,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-10T21:24:37.875Z","etag":null,"topics":["cli","react","redux","terminal"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/1999.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-09-19T00:47:59.000Z","updated_at":"2021-06-10T11:36:52.000Z","dependencies_parsed_at":"2022-08-08T05:15:31.249Z","dependency_job_id":null,"html_url":"https://github.com/1999/terminal-dispatch-state","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1999%2Fterminal-dispatch-state","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1999%2Fterminal-dispatch-state/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1999%2Fterminal-dispatch-state/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1999%2Fterminal-dispatch-state/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/1999","download_url":"https://codeload.github.com/1999/terminal-dispatch-state/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247166157,"owners_count":20894652,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","react","redux","terminal"],"created_at":"2024-10-10T22:50:03.128Z","updated_at":"2026-05-05T13:35:27.503Z","avatar_url":"https://github.com/1999.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## terminal-dispatch-state\n\nBuild dynamic terminal interfaces by updating the state.\n\n![](./examples/demo.svg)\n\n## API\n\n```javascript\nimport { Store } from '@atlassian/terminal-dispatch-state';\nimport ora from 'ora'; // if you want to show a spinner\n\nconst store = new Store();\nconst state = [\n  'line1',\n  'line2',\n  'line3',\n];\n\nstore.update(state); // renders three lines in the terminal\n\nstate.push('line4');\nstore.update(state); // does not render anything because state is the same object\n\nconst newState = [...state];\nstore.update(newState); // adds one line\n\nconst spinner = ora('Loading unicorns');\nconst newStateWithUnicorns = [\n  ...newState,\n  { spinner, isRunning: true }\n]\nstore.update([...newState, progress]); // adds ora spinner with text\n\nstore.stop();\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F1999%2Fterminal-dispatch-state","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F1999%2Fterminal-dispatch-state","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F1999%2Fterminal-dispatch-state/lists"}