Add Store.init that takes reducer builder (#2087)

* Add `Store.init` that takes reducer builder

* wip

* wip

* added some tests

* wip

* wip

* wip

---------

Co-authored-by: Brandon Williams <mbrandonw@hey.com>
This commit is contained in:
Stephen Celis
2023-05-11 12:30:08 -07:00
committed by GitHub
parent c096892cad
commit 767231d179
119 changed files with 1363 additions and 1422 deletions

View File

@@ -86,10 +86,9 @@ final class CounterViewController: UIViewController {
struct CounterViewController_Previews: PreviewProvider {
static var previews: some View {
let vc = CounterViewController(
store: Store(
initialState: Counter.State(),
reducer: Counter()
)
store: Store(initialState: Counter.State()) {
Counter()
}
)
return UIViewRepresented(makeUIView: { _ in vc.view })
}