Reswift: What's the main difference to SwiftRex?

Created on 27 Dec 2019  路  2Comments  路  Source: ReSwift/ReSwift

I find the idea of Redux on iOS very, very, VERY cool - and try to find the right framework for me to start with this architecture.

ReSwift seems to have more coverage on medium, youtube etc. - but I like SwiftRex very well documented and pretty interesting as well... what are the main differences here?

Most helpful comment

Looks like they both cover the same functionality. I'd be interested in seeing benchmarks to compare performance across the two.

ReSwift is also easily connectable to reactive libraries. There are numerous examples strewn about the web for various reactive libraries. (ReRxSwift, ReactiveReSwift, the mjarvis/swiftui branch for combine)

In https://github.com/SwiftRex/SwiftRex/issues/44 they also mention the ability to use generics to hide implementation details of the state / store from controllers and subscribers. While not as obvious, this is also possible using ReSwift (And is something I've done in every project), by declaring protocols for substate, and then making your controllers generic such as S: StoreType where S.State: HasUsers. This is also possible for middleware too, meaning objects do not need to know about your entire state.

In general, I'm very happy to see another alternative crop up. Competition in this area just helps come up with new ideas & push the capabilities & performance.

All 2 comments

Hey! I didn鈥檛 know about SwiftRex! Thanks for sharing. Checking its docs, I think that being able to use one of the three main reactive libraries is quite cool and powerful. It seems that the cores of both libraries cover the same set of features, and I鈥檇 say ReSwift can be simpler somehow.

Looks like they both cover the same functionality. I'd be interested in seeing benchmarks to compare performance across the two.

ReSwift is also easily connectable to reactive libraries. There are numerous examples strewn about the web for various reactive libraries. (ReRxSwift, ReactiveReSwift, the mjarvis/swiftui branch for combine)

In https://github.com/SwiftRex/SwiftRex/issues/44 they also mention the ability to use generics to hide implementation details of the state / store from controllers and subscribers. While not as obvious, this is also possible using ReSwift (And is something I've done in every project), by declaring protocols for substate, and then making your controllers generic such as S: StoreType where S.State: HasUsers. This is also possible for middleware too, meaning objects do not need to know about your entire state.

In general, I'm very happy to see another alternative crop up. Competition in this area just helps come up with new ideas & push the capabilities & performance.

Was this page helpful?
0 / 5 - 0 ratings