Git Product home page Git Product logo

cle-architecture-tools's People

Contributors

danielt1263 avatar peagasilva avatar tylerjames avatar ui10 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

cle-architecture-tools's Issues

Strange behavior of the "cycle(input: .. ") method

Hello,

I am trying to implement a "state machine" pattern. I found the necessary tools for that in this library.
However, in the process I get strange behavior of this method:

cycle<State, Input>(
	input: Observable<Input>,
	initialState: State,
	reduce: @escaping (inout State, Input) -> Void,
	reaction: @escaping Reaction<State, Input>
)

Look at the screen image where I get the results in the wrong order. After "20" I expect to see "21, 22, ..." (a new page), but I get the first page twice.

It may also not react to my actions or react twice to the single action.

image

I have had experience with the RxFeedback framework and I find this approaches very similar (or not?).

So I tried to use RxFeedback for the same purpose and it works fine.

I assume I made some mistakes in the CLE approach, but I can't figure it out, because I'm new to "unidirectional systems".

For the demonstration I prepared a classic "infinite scroll" project using both approaches. The source code of identical, but the result is not.

I think it would be better if I show my repository with a simple demo project.
https://github.com/rezuantpr/RxFeedback-vs-CLE

Thanks for any help

P.s. Just compare "RxFeedbackPagingViewModel.swift" and "CLEPagingVewModel.swift" files.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.