EasyReact is an easy-to-use reactive programming framework.
Why use EasyReact
Are you confused by the functors, applicatives, and monads in RxSwift and ReactiveCocoa? It doesn’t matter, the concepts are so complicated that not many developers actually use them in normal projects. Is there an easy-to-use way to use reactive programming? EasyReact is born for this reason.
Features
Note: The “Node” listed below refer to EZRNode, a unified representation of various values (all object types) in EasyReact.
git clone this repo,excute pod install in Example/, then open EasyReact.xcworkspace.
Installation
CocoaPods
Add the following content in Podfile
pod 'EasyReact'
Then execute pod install
How to use (For a more detailed example, please see the test specs in the example project Tests/)
Unit Test
EasyReact contains a complete unit test with the relevant code in the Example/Tests folder. You can open the sample project and execute the Test command to run these unit tests.
Time-consuming Benchmarking with EasyReact and ReactiveCocoa Common APIs
Environment
Build Platform: macOS Mojave 10.14
IDE: Xcode 10.0(10A255)
Device: iPhone XS Max 256G iOS 12.0(16A366)
Cases
Single stage operations, such as listener, map, filter, flattenMap, etc.
Multicast operations, such as combine, zip, merge, etc.
syncWith operations
The scale of the test is based on 10 operating objects and 1000 triggers. For example, the listener method has 10 listeners and repeats the action of sending the value 1000 times.
The unit of time is ns.
Result data
Repeat the above experiment 10 times to get the data as follows:
name
listener
map
filter
flattenMap
combine
zip
merge
syncWith
EasyReact
4218689
26615802
9872381
9896752
5744164
48405085
29639206
11846827
ReactiveCocoa
2263981
42883385
28768289
28810331
127882031
82689281
6809210
30935277
RAC:EasyReact
53.7%
161.1%
291.4%
291.1%
2226.3%
170.8%
23.0%
261.1%
Summary
ReactiveCocoa’s average time consuming is 434.8% times more than EasyReact.
EasyReact will compare benchmark with RxSwift when the Swift version open source recently.
Read this in other languages: 简体中文
What is EasyReact
EasyReact is an easy-to-use reactive programming framework.
Why use EasyReact
Are you confused by the functors, applicatives, and monads in RxSwift and ReactiveCocoa? It doesn’t matter, the concepts are so complicated that not many developers actually use them in normal projects. Is there an easy-to-use way to use reactive programming? EasyReact is born for this reason.
Features
Note: The “Node” listed below refer to
EZRNode, a unified representation of various values (all object types) in EasyReact.Learn more
Framework Overview
Basic Operations
Memory Management
How to Contribute
Compare other Functional Reactive libraries (e.g. ReactiveCocoa or ReactiveX)
(Other language versions will open source in the future)
More rich dynamic debugging tools(Coming soon)
System Requirements
How to run the example project
git clonethis repo,excutepod installin Example/, then openEasyReact.xcworkspace.Installation
CocoaPods
Add the following content in
PodfileThen execute
pod installHow to use (For a more detailed example, please see the test specs in the example project Tests/)
Unit Test
EasyReact contains a complete unit test with the relevant code in the Example/Tests folder. You can open the sample project and execute the Test command to run these unit tests.
Time-consuming Benchmarking with EasyReact and ReactiveCocoa Common APIs
Environment
Build Platform: macOS Mojave 10.14
IDE: Xcode 10.0(10A255)
Device: iPhone XS Max 256G iOS 12.0(16A366)
Cases
The scale of the test is based on 10 operating objects and 1000 triggers. For example, the listener method has 10 listeners and repeats the action of sending the value 1000 times. The unit of time is ns.
Result data
Repeat the above experiment 10 times to get the data as follows:
Summary
ReactiveCocoa’s average time consuming is 434.8% times more than EasyReact.
EasyReact will compare benchmark with RxSwift when the Swift version open source recently.
Authors
William Zang, chengwei.zang.1985@gmail.com
姜沂, nero_jy@qq.com
Qin Hong, qinhong@face2d.com
SketchK, zhangsiqi1988@gmail.com
zesming, ming9010@gmail.com
Zhiyu Wong, www312422@vip.qq.com
johnnywjy, johnny.wjy07@gmail.com
qiezishu, qiezishu@yahoo.com
License
EasyReact is Apache Public License 2.0