{"id":16853170,"url":"https://github.com/devxoul/sectionreactor","last_synced_at":"2025-03-22T06:30:55.524Z","repository":{"id":62455062,"uuid":"102924629","full_name":"devxoul/SectionReactor","owner":"devxoul","description":"A ReactorKit extension for managing table view and collection view sections with RxDataSources","archived":false,"fork":false,"pushed_at":"2019-06-15T06:15:01.000Z","size":62,"stargazers_count":46,"open_issues_count":0,"forks_count":7,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-18T08:53:27.686Z","etag":null,"topics":["collectionview","reactorkit","rxdatasources","sectionreactor","tableview"],"latest_commit_sha":null,"homepage":null,"language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/devxoul.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-09-09T03:42:56.000Z","updated_at":"2024-12-26T00:40:28.000Z","dependencies_parsed_at":"2022-11-02T00:00:39.271Z","dependency_job_id":null,"html_url":"https://github.com/devxoul/SectionReactor","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devxoul%2FSectionReactor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devxoul%2FSectionReactor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devxoul%2FSectionReactor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devxoul%2FSectionReactor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devxoul","download_url":"https://codeload.github.com/devxoul/SectionReactor/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244918500,"owners_count":20531682,"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":["collectionview","reactorkit","rxdatasources","sectionreactor","tableview"],"created_at":"2024-10-13T13:50:00.290Z","updated_at":"2025-03-22T06:30:54.775Z","avatar_url":"https://github.com/devxoul.png","language":"Swift","readme":"# SectionReactor\n\n![Swift](https://img.shields.io/badge/Swift-5.0-orange.svg)\n[![CocoaPods](http://img.shields.io/cocoapods/v/SectionReactor.svg)](https://cocoapods.org/pods/SectionReactor)\n[![Build Status](https://travis-ci.org/devxoul/SectionReactor.svg?branch=master)](https://travis-ci.org/devxoul/SectionReactor)\n[![Codecov](https://img.shields.io/codecov/c/github/devxoul/SectionReactor.svg)](https://codecov.io/gh/devxoul/SectionReactor)\n\nSectionReactor is a ReactorKit extension for managing table view and collection view sections with RxDataSources.\n\n## Getting Started\n\nThis is a draft. I have no idea how would I explain this concept 🤦‍♂️ It would be better to see the [ArticleFeed](https://github.com/devxoul/SectionReactor/tree/master/Examples/ArticleFeed) example.\n\n**ArticleViewSection.swift**\n\n```swift\nenum ArticleViewSection: SectionModelType {\n  case article(ArticleSectionReactor)\n\n  var items: [ArticleViewSection] {\n    switch self {\n    case let .article(sectionReactor):\n      return sectionReactor.currentState.sectionItems\n    }\n  }\n}\n```\n\n**ArticleSectionReactor.swift**\n\n```swift\nimport SectionReactor\n\nfinal class ArticleSectionItem: SectionReactor {\n  struct State: SectionReactorState {\n    var sectionItems: [ArticleSectionItem]\n  }\n}\n```\n\n**ArticleListViewReactor.swift**\n\n```swift\nfinal class ArticleListViewReactor: Reactor {\n  struct State {\n    var articleSectionReactors: [ArticleSectionReactor]\n    var sections: [ArticleViewSection] {\n      return self.articleSectionReactors.map(ArticleViewSection.article)\n    }\n  }\n\n  func transform(state: Observable\u003cState\u003e) -\u003e Observable\u003cState\u003e {\n    return state.merge(sections: [\n      { $0.articleSectionReactors },\n    ])\n  }\n}\n```\n\n## Dependencies\n\n* [ReactorKit](https://github.com/ReactorKit/ReactorKit) \u003e= 0\n* [RxDataSources](https://github.com/RxSwiftCommunity/RxDataSources) \u003e= 2.0\n\n## Installation\n\n```ruby\npod 'SectionReactor'\n```\n\n## License\n\nSectionReactor is under MIT license. See the [LICENSE](LICENSE) for more info.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevxoul%2Fsectionreactor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevxoul%2Fsectionreactor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevxoul%2Fsectionreactor/lists"}