{"id":21522441,"url":"https://github.com/crapthings/meteor-data-container","last_synced_at":"2025-03-17T17:24:11.001Z","repository":{"id":153190812,"uuid":"71685032","full_name":"crapthings/meteor-data-container","owner":"crapthings","description":"this container let your write less code","archived":false,"fork":false,"pushed_at":"2016-11-01T07:24:29.000Z","size":17,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-24T04:52:41.522Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/crapthings.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"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":"2016-10-23T06:04:33.000Z","updated_at":"2017-03-27T09:44:58.000Z","dependencies_parsed_at":"2023-07-24T08:31:46.162Z","dependency_job_id":null,"html_url":"https://github.com/crapthings/meteor-data-container","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/crapthings%2Fmeteor-data-container","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crapthings%2Fmeteor-data-container/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crapthings%2Fmeteor-data-container/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crapthings%2Fmeteor-data-container/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/crapthings","download_url":"https://codeload.github.com/crapthings/meteor-data-container/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244075655,"owners_count":20393980,"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":[],"created_at":"2024-11-24T01:10:31.985Z","updated_at":"2025-03-17T17:24:10.972Z","avatar_url":"https://github.com/crapthings.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Installation\n\n    meteor npm i lodash react-komposer --save\n\n    meteor add crapthings:meteor-data-container\n\n## Usage\n\n\u003e publish your `posts` and return your posts cursor\n\n```\nMeteor.publish('posts', function (userId) {\n    const selector = userId ? { userId } : {}\n    return Posts.find(selector)\n})\n```\n\n\u003e use `MeteorDataContainer` to get your `reactive` data\n\n```\n\nconst subscriptions = {\n  posts: []\n}\n\nconst data = {\n  posts () {\n    return Posts.find().fetch()\n  {\n}\n\nconst PostsListComponent = () =\u003e \u003cMeteorDataContainer sources={{ subscriptions, data }} component={({ posts }) =\u003e \u003cdiv\u003e\n  {posts.map(post) =\u003e \u003cp key={post._id}\u003e{post.title}\u003c/p\u003e}\n\u003c/div\u003e} /\u003e\n\n```\n\n\u003e \"subscriptions\" is an object. each of keys in subscriptions is the subscribe name, and value should be an array that apply as publish args\n\n\u003e \"data\" is an object, each of keys can be use in container under props\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrapthings%2Fmeteor-data-container","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcrapthings%2Fmeteor-data-container","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrapthings%2Fmeteor-data-container/lists"}