CombineFeedback icon indicating copy to clipboard operation
CombineFeedback copied to clipboard

Discrepancy in the Examples

Open adriansergheev opened this issue 4 years ago • 8 comments

In the lib itself, the Reducer<State, Event> is a typealias, like so: public typealias Reducer<State, Event> = (inout State, Event) -> Void In the Examples however, they use a struct, with an init, like so:

` public let reduce: (inout State, Event) -> Void

public init(reduce: @escaping (inout State, Event) -> Void) {
    self.reduce = reduce
} etc...`

Where is the truth? :)

Thanks for the work on the library!

adriansergheev avatar May 04 '20 13:05 adriansergheev

Hey, it may be a mistake or a typo on my side the reducer now is a struct, I took this idea from Pointfree composable architecture https://github.com/sergdort/CombineFeedback/blob/master/Sources/CombineFeedback/Reducer.swift#L3

sergdort avatar May 12 '20 14:05 sergdort

@sergdort I found the same issue. Then you install the library from Swift Package manager you have a different Reducer implementation. I would be so nice if you can update the package

VNadygin avatar May 25 '20 10:05 VNadygin

@VNadygin For now you can use .package(url: "[email protected]/sergdort/CombineFeedback.git", .branch("master"))

Btw today I figured out, that there is no example with navigating back programmatically 😢 (And I don't know yet how to handle it, yet, so maybe it's not too late to send feedback before I figure it out by myself 😎)

maximkrouk avatar Jun 06 '20 23:06 maximkrouk

I'm seeing the same thing happening but regarding feedbacks. Pointing to master solved it, thanks @maximkrouk and @VNadygin

NSMyself avatar Aug 10 '20 12:08 NSMyself

Do I need to publish new version 🤔

sergdort avatar Aug 10 '20 13:08 sergdort

Also guys I'm a lacking free time lately. So if someone would like to be a maintainer I would love to create an org and move project there

sergdort avatar Aug 10 '20 13:08 sergdort

@sergdort I don't have much nowadays but I'd gladly help out on what i can.

NSMyself avatar Aug 20 '20 14:08 NSMyself

I have migrated to the composable architecture btw 👽

maximkrouk avatar Aug 20 '20 18:08 maximkrouk