Swiftpack.co - Package - Spinners/Spin.Swift

Spin.Swift

Spin Logo

Spin aims to provide a versatile Feedback Loop implementation working with the three main reactive frameworks available in the Swift community:

Spin offers a unified syntax whatever the underlying reactive framework you choose to use.

Spin allows to build a Feedback Loop very easily either using a builder pattern, or using a declarative "SwiftUI like" syntax.

Spinner
    .from(initialState: State.loading(planet: planet))
    .add(feedback: ReactiveFeedback(feedback: loadFeedback, on: QueueScheduler()))
    .add(feedback: ReactiveFeedback(uiFeedbacks: renderStateFeedback, emitActionFeedback, on: UIScheduler()))
    .reduce(with: ReactiveReducer(reducer: reducer))

or

var spin: ReactiveSpin<State> {
    ReactiveSpin(initialState: State.loading(planet: planet),
                 reducer: ReactiveReducer(reducer: reducer)) {
        ReactiveFeedback(feedback: loadFeedback).execute(on: QueueScheduler())
        ReactiveFeedback(uiFeedbacks: renderStateFeedback, emitActionFeedback).execute(on: UIScheduler())
    }
}

Github

link
Stars: 0

Dependencies

Used By

Total: 0

Releases

Crait - 2020-01-10 04:15:48

This release brings UT to the external rendering function of ViewContexts

Corellia - 2020-01-10 04:07:02

This release brings the ability to provide in a weakified way a rendering fonction to a ViewContext (from a ViewController for instance)

Anoat - 2020-01-09 22:38:29

This release weakifies the usage of self in the ViewContexts to avoid retain cycles.

Bespin - 2020-01-09 02:33:01

This release brings the concept of ViewContext.

A ViewContext is the best way to represent a UI Feedback, especially in a SwiftUI context as it is also an ObservableObject.

Ahch-To - 2020-01-01 15:38:27

This release groups all the Spin package into a unified one, distributing frameworks through a dedicated library inside the package.

Alderaan - 2019-12-31 01:33:52

Initial version of the Spin framework. It provides an abstraction and a default implementation for Feedback Loop. The three main reactive frameworks in the Swift community will support Spin.