Skip to content

SwiftUI & Combine app using MovieDB API. With a custom Flux (Redux) implementation.

Notifications You must be signed in to change notification settings

reduxkotlin/MovieSwiftUI-Kotlin

 
 

Repository files navigation

MovieSwiftUI-Kotlin


This is a fork of MovieSwiftUI using ReduxKotlin. Code ported to Kotlin includes:

  • entire flux directory(models, actions, async actions, reducers)
  • APIService
  • AppUserDefaults
  • some Props & Mappers
  • save/restore state logic & serialization (saving as JSON string - custom Codable implementation may be a better solution
  • date formatting

Only a very buggy and hacky Android implementation of the Now Playing screen with Jetpack Compose at this point.


MovieSwiftUI is an application that uses the MovieDB API and is built with SwiftUI. It demos some SwiftUI (& Combine) concepts. The goal is to make a real world application using SwiftUI only. It'll be updated with new features as they come to the SwiftUI framework.

App Image

Architecture

MovieSwiftUI data flow is a subset and a custom implementation of the Flux part of Redux. It implement the State in an ObservableObject as a @Published wrapped property, so changes are published whenever a dispatched action produces a new state after being reduced. The state is injected as an environment object in the root view of the application, and is easily accessible anywhere in the application. SwiftUI does all aspects of diffing on the render pass when your state changes. No need to be clever when extracting props from your State, they're simple dynamic vars at the view level. No matter your objects' graph size, SwiftUI speed depends on the complexity of your views hierarchy, not the complexity of your object graph.

SwiftUI

MovieSwiftUI is in pure Swift UI, the goal is to see how far SwiftUI can go in its current implementation without using anything from UIKit (basically no UIView/UIViewController representable).

It'll evolve with SwiftUI, every time Apple edits existing or adds new features to the framework.

Platforms

Currently MovieSwiftUI runs on iPhone, iPad, and macOS.

Follow me on Twitter to get the latest update about features, code and SwiftUI tips and tricks!

About

SwiftUI & Combine app using MovieDB API. With a custom Flux (Redux) implementation.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Objective-C 52.5%
  • Swift 34.1%
  • Kotlin 13.4%