DevYeom / OneWay

A Swift library for state management with unidirectional data flow.
https://swiftpackageindex.com/DevYeom/OneWay/2.9.0/documentation/oneway
MIT License
78 stars 8 forks source link

Improve dynamic shared stream for safe value sharing #37

Closed DevYeom closed 12 months ago

DevYeom commented 12 months ago

Related Issues 💭

Description 📝

Resolved the issue of missing initial values when creating a new AsyncSequence via the subscript of DynamicSharedStream.

Additional Notes 📚

// number <- 10, 20

Task {
    for await state in sut.states {
        print(state.number) // 10, 20
    }
}

Task {
    for await number in sut.states.number {
        print(number) // 10, 20
    }
}

Checklist ✅