Komponents ๐ฆ alternatives and similar libraries
Based on the "Reactive Programming" category.
Alternatively, view Komponents ๐ฆ alternatives based on common mentions on social networks and blogs.
-
JASONETTE-iOS
Native App over HTTP. Create your own native iOS app with nothing but JSON. -
ReactiveSwift
Streams of values over time by ReactiveCocoa group -
RxAlamofire
RxSwift wrapper around the elegant HTTP networking in Swift Alamofire -
OpenCombine
Open source implementation of Apple's Combine framework for processing values over time. -
RxCoordinator
Powerful navigation library for iOS based on the coordinator pattern. -
ReactiveKit
ReactiveKit is a collection of Swift frameworks for reactive and functional reactive programming. -
Interstellar
Simple and lightweight Functional Reactive Coding in Swift for the rest of us. :large_orange_diamond: -
RxAutomaton
RxSwift + State Machine, inspired by Redux and Elm. -
NSObject-Rx
Handy RxSwift extensions on NSObject, including rx_disposeBag. -
Hanson
Lightweight observations and bindings in Swift, with support for KVO and NotificationCenter. -
RxMediaPicker
A reactive wrapper built around UIImagePickerController. -
VueFlux
Unidirectional Data Flow State Management Architecture for Swift -
ReactiveCoreData
ReactiveCoreData (RCD) is an attempt to bring Core Data into the ReactiveCocoa (RAC) world. -
Verge
Verge is a faster and scalable state management library for UIKit and SwiftUI -
Reactor
๐ Unidirectional Data Flow using idiomatic Swift-inspired by Elm and Redux . -
ReactiveTask
Flexible, stream-based abstraction for launching processes -
TemplateKit
React-inspired framework for building component-based user interfaces in Swift. -
RxReduce
Lightweight framework that ease the implementation of a state container pattern in a Reactive Programming compliant way. -
LightweightObservable
A lightweight implementation of an observable sequence that you can subscribe to. -
Aftermath
Stateless message-driven micro-framework in Swift. -
RxMultipeer
A testable RxSwift wrapper around MultipeerConnectivity -
ReactiveArray
An array class implemented in Swift that can be observed using ReactiveCocoa's Signals. -
RxWebSocket
Reactive extension over Starscream for websockets -
SimpleApiClient
A configurable api client based on Alamofire4 and RxSwift4 for iOS. -
ACKReactiveExtensions
Useful extensions for ReactiveCocoa -
Bindy
Simple, lightweight swift bindings with KVO support and easy to read syntax. -
BindKit
Two-way data binding framework for iOS. Only one API to learn. -
STDevRxExt
STDevRxExt contains some extension functions for RxSwift and RxCocoa which makes our live easy. -
Listenable
Swift object that provides an observable platform. -
RxAlamoRecord
Combines the power of the AlamoRecord and RxSwift libraries to create a networking layer that makes interacting with API's easier than ever reactively. -
RxOptional
RxSwift extentions for Swift optionals and "Occupiable" types -
Tokamak
React-like framework providing a declarative API for building native UI components with easy to use one-way data binding.
Scout APM - Leading-edge performance monitoring starting at $39/month
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest. Visit our partner's website for more details.
Do you think we are missing an alternative of Komponents ๐ฆ or a related project?
README
[Komponents](banner.png)
โ ๏ธ Swift UI is out so this is now deprecated in favor of the official alternative. This will no longer be maintained. This was a fun experiment ๐
Komponents
Komponents is a Swift framework for building component-oriented interfaces.
Because it's unfair to need javascript to enjoy Components ! ๐
Komponents | |
---|---|
๐ถ | Pure Swift (no JS, no XML) |
๐จ | Declarative Api |
๐ | Hot Reload with injectionForXcode |
โ๏ธ | Diff algorithm running in background |
๐ | Can be used Incrementally in your App |
๐ธ | No external Dependencies |
[Demo](demo.gif) Building a Loading screen with Hot reload ๐ฉ
class LoadingVC: UIViewController, StatelessComponent {
override func loadView() { loadComponent() }
func render() -> Tree {
return
View([
HorizontalStack(layout: .center, [
Label("Loading..."), ActivityIndicatorView(.gray)
])
])
}
}
This is all we need to render a loading view !
Getting Started
New to components? Fear not! Facebook's React guide is a gold mine of information to get you started :)
The easiest way to get started and feel the power of Komponents is to take a look at the example project KomponentsExample.xcodeproj
and play around !
For an even better experience, we strongly recommend enabling Hot reload
You can learn how, like React, Komponents tries to be smart about what it rerenders when the state changes in Patching section.
You can find more detailed information and guides in the Wiki
Installation
Komponents can be installed Manually, via Carthage, Cocoapods or Swift Package Manager.
Detailed installation steps in the wiki here
Contributors
YannickDot,
S4cha, YOU ?!
We'd love to hear what you think so don't hesitate to reach out through an issue or via twitter
@sachadso
License
Komponents is released under the MIT license. See LICENSE for details.
Inspiration
Facebook's React, ComponentKit, Preact, Vue.js AlexDrone's render, Angular...
Other great libraries
We're not the first to tackle the great endeavor of swift components and here are some other very cool projects :
โ ๏ธ v 0.2 ๐
Please be aware that this is still very experimental ๐ฌ.
The actual api can and will change.
This is not battle-tested and we advise you against using this in Appstore Apps (for now)
Declarative Styling via Props ๐จ
Applying styles directly on the UIKit elements was super handy in v0.1
but came with major strings attached. Indeed, the styles blocks in the nodes could only be called on the main thread, because UIKit is meant to be accessed from the UI Thread (for the most part).
Also, in order to compare styles, we needed to create a duplicate UIKit element (heavy) and look for differences on it.
That's where Props
come in!
The idea is to have a Props layer, aka a structure that defines an element's style, that is Equatable
.
Being equatable, it becomes trivial to compare two buttons styles.
For instance, you can just write :
let styleIsTheSame = (button.props == newButton.props)
Being Value-typed, it is also safe to process the diff in background !
Could we get all this goodness for free? Of course not, welcome to engineering.
The major drawback is that we have to bridge every UIKit element property to its corresponding Props
struct.
However the properties supported can only get better with time classic escape hatch through refs will always be accessible to access UIkit elements if a property is not yet supported.
This is worth it!
A dead-simple declarative layout ๐
The coming version is switching from Autolayout (and Stevia) to a declarative layout.
The new layout system is based on a super simple Layout
struct, that, combined with classic StackViews
enables 99.9% of layout cases.
It is a value type, meaning it will be thread safe and thus enable comparison in a background thread :)
Diffing on the virtual DOM. ๐
With elements
, styling
, and layout
purely declarative, Value-Type and Equatable, we can now safely put all the heavy duty stuff off to a background thread !!!
In v0.2
, the diffing algorithm (also known as reconciliation) will run on the virtual DOM, on a background thread and only schedule UI changes on the UI thread. ๐
Backers
Like the project? Offer coffee or support us with a monthly donation and help us continue our activities :)
Sponsors
Become a sponsor and get your logo on our README on Github with a link to your site :)
*Note that all licence references and agreements mentioned in the Komponents ๐ฆ README section above
are relevant to that project's source code only.