{"id":23058706,"url":"https://github.com/suhdev/mobx-react-slot","last_synced_at":"2025-04-03T06:20:38.355Z","repository":{"id":43565283,"uuid":"205538385","full_name":"suhdev/mobx-react-slot","owner":"suhdev","description":"A mobx-driven React slot implementation","archived":false,"fork":false,"pushed_at":"2023-01-04T08:36:25.000Z","size":1507,"stargazers_count":0,"open_issues_count":23,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-08T20:14:07.250Z","etag":null,"topics":[],"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/suhdev.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-08-31T11:57:20.000Z","updated_at":"2023-08-20T09:59:55.000Z","dependencies_parsed_at":"2023-02-02T05:32:08.740Z","dependency_job_id":null,"html_url":"https://github.com/suhdev/mobx-react-slot","commit_stats":null,"previous_names":["suhdev/mobx-react-slot"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suhdev%2Fmobx-react-slot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suhdev%2Fmobx-react-slot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suhdev%2Fmobx-react-slot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suhdev%2Fmobx-react-slot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/suhdev","download_url":"https://codeload.github.com/suhdev/mobx-react-slot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246944796,"owners_count":20858849,"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-12-16T02:17:15.104Z","updated_at":"2025-04-03T06:20:38.344Z","avatar_url":"https://github.com/suhdev.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @stickyants/mobx-react-slot\n\nAn implementation of slots using for mobx-driven React apps. \n\n## Usage\n\n```typescript \n\nimport * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport { SlotContainer, Slot, SlotContent } from '..';\n\nfunction App({ children }) {\n  return (\n    \u003cSlotContainer\u003e\n      \u003cdiv id=\"top-level\"\u003e\n        \u003cdiv className=\"dashboard__top-bar\"\u003e\n          \u003cSlot name=\"TopBar\" /\u003e\n        \u003c/div\u003e\n        \u003cdiv className=\"dashboard__content\"\u003e\n          \u003cSlot name=\"Content\" /\u003e\n        \u003c/div\u003e\n      \u003c/div\u003e\n      {children}\n    \u003c/SlotContainer\u003e\n  );\n}\n\nfunction Counter() {\n  const [count, setCount] = React.useState(0);\n\n  return (\n    \u003cdiv className=\"counter\"\u003e\n      \u003cdiv\u003e{count}\u003c/div\u003e\n      \u003cbutton onClick={() =\u003e setCount(count =\u003e count + 1)}\u003eIncrement\u003c/button\u003e\n    \u003c/div\u003e\n  );\n}\n\nReactDOM.render(\n  \u003cApp\u003e\n    \u003cSlotContainer\u003e\n      \u003cSlot name=\"box\" /\u003e\n      \u003cSlotContent name=\"Content\"\u003e\n        Test App\n        \u003cSlotContent name=\"TopBar\"\u003e\n          Top Bar 3\n        \u003c/SlotContent\u003e\n        \u003cSlotContent name=\"TopBar\"\u003e\n          Top Bar 4 (overrides 3)\n          \u003cCounter /\u003e\n        \u003c/SlotContent\u003e\n      \u003c/SlotContent\u003e\n    \u003c/SlotContainer\u003e\n  \u003c/App\u003e,\n  document.getElementById('root'));\n\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuhdev%2Fmobx-react-slot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsuhdev%2Fmobx-react-slot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuhdev%2Fmobx-react-slot/lists"}