Code Monkey home page Code Monkey logo

reactorviewstore's Introduction

ReactorViewStore

ReactorTCA와 유사한 형태로 Maapping합니다.

There is also an explanation in English.

💁🏻‍♂️ 순수한 Swift, SwiftUI 를 사용하여 구현되었습니다.
💁🏻‍♂️ SwiftUI와 ReactorKit을 연결하는 extension입니다.
💁🏻‍♂️ 각 영역(View, Reactor) 독립성을 추구하며, 중립적인 라이브러리 입니다.

장점

✅ ReactorViewStore를 사용하면, UIKit+ReactorKit기반의 프로젝트에 SwiftUI 도입이 용이해집니다.
✅ ReactorKit, UIKit, SwiftUI 등 각 영역의 독립성을 추구하며, 중립적입니다. 추후 제거에 용이합니다.
✅ 보다 쉽게, Action을 발행하고, State를 Binding할 수 있습니다.

사용방법

간단한 코드로, SwiftUI에 ReactorKit을 적용할 수 있습니다.

import SwiftUI
import ReactorViewStore

public struct DummyView: View {
  @ObservedObject
  private var viewStore: ReactorViewStore<DummyViewReactor>

  public var body: some View {
    // State를 Binding합니다.
    Text(viewStore.state.text)
      .onAppear {
        // Action을 발행합니다.
        viewStore.send(.onAppear)
      }
  }
}

Swift Package Manager(SPM) 을 통해 사용할 수 있어요

dependencies: [
  .package(url: "https://github.com/Monsteel/ReactorViewStore.git", .upToNextMajor(from: "0.0.1"))
]

사용하고 있는 곳.

회사 설명
UIKit 기반으로 개발된 정육각 커머스 앱에서, SwiftUI 부분도입을 위해 사용하고 있습니다.
향후 SwiftUI로 전환 후 TCA 도입이 목표입니다.

함께 만들어 나가요

개선의 여지가 있는 모든 것들에 대해 열려있습니다.
PullRequest를 통해 기여해주세요. 🙏

License

ReactorViewStore 는 MIT 라이선스로 이용할 수 있습니다. 자세한 내용은 라이선스 파일을 참조해 주세요.
ReactorViewStore is available under the MIT license. See the LICENSE file for more info.

Auther

이영은(Tony) | [email protected]

Hits

reactorviewstore's People

Contributors

monsteel avatar

Stargazers

Hyunjin avatar Ethen avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.