{"id":15062494,"url":"https://github.com/geut/mst-drama","last_synced_at":"2025-04-10T13:32:42.413Z","repository":{"id":88986071,"uuid":"114932199","full_name":"geut/mst-drama","owner":"geut","description":"A set of functions to work with the actions of mobx-state-tree","archived":false,"fork":false,"pushed_at":"2017-12-23T16:49:59.000Z","size":590,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-24T12:11:31.207Z","etag":null,"topics":["actions","mobx","mobx-state-tree","redux-devtools"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/geut.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-12-20T21:21:14.000Z","updated_at":"2020-07-16T12:45:57.000Z","dependencies_parsed_at":null,"dependency_job_id":"0ab145ba-7e6a-4496-b5f9-5e127bf4dfbf","html_url":"https://github.com/geut/mst-drama","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/geut%2Fmst-drama","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geut%2Fmst-drama/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geut%2Fmst-drama/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geut%2Fmst-drama/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/geut","download_url":"https://codeload.github.com/geut/mst-drama/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247819955,"owners_count":21001397,"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":["actions","mobx","mobx-state-tree","redux-devtools"],"created_at":"2024-09-24T23:41:28.495Z","updated_at":"2025-04-10T13:32:42.392Z","avatar_url":"https://github.com/geut.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mst-drama\n\u003e an event or situation, especially an unexpected one, in which there is worry or excitement and usually a lot of **action**\n\n[![Build Status](https://travis-ci.org/geut/mst-drama.svg?branch=master)](https://travis-ci.org/geut/mst-drama)\n[![Stability: Experimental](https://masterminds.github.io/stability/experimental.svg)](https://masterminds.github.io/stability/experimental.html)\n\n## Contents\n\n* [Introduction](##introduction)\n* [Installation](##installation)\n\n## Introduction\n\nDrama is a set of functions that help you to work with [mobx-state-tree](https://github.com/mobxjs/mobx-state-tree)\nand their **actions**.\n\nAt the moment there are only 2 functions:\n\n#### connectReduxDevtools(remotedev: object, store: object, options: { trackYield: false })\n\nconnectReduxDevtools works similar to the original connect from MST but also tracks each `yield` in your async actions so\nyou can see in the redux devtool how the state mutates in each step.\n\n```javascript\n...\nimport { connectReduxDevtools } from '@geut/mst-drama';\n...\nconnectReduxDevtools(require('remotedev'), store);\n```\n\n![connect-redux-devtool](https://github.com/geut/mst-drama/raw/master/example/connect-redux-devtool.gif)\n\n#### flowMap(actions: object)\n\nflowMap iterates over an object of actions and converts each generator function found in a flow async action.\n\n```javascript\n...\nimport { flowMap } from '@geut/mst-drama';\n\nconst Todo = types.model({\n        title: types.string\n    })\n    .actions(self =\u003e flowMap({\n        setTitle(newTitle) {\n            self.title = newTitle\n        },\n        *asyncSetTitle(newTitle) {\n            yield delay(2000);\n            self.title = newTitle;\n        }\n    }))\n\n```\n\n## Installation\n\n* NPM: `npm install @geut/mst-drama`\n* Yarn: `yarn add @geut/mst-drama`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeut%2Fmst-drama","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgeut%2Fmst-drama","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeut%2Fmst-drama/lists"}