Commit Graph

68 Commits

Author SHA1 Message Date
Stephen Celis
b6ce7143cc Clarify view store thread safety (#692)
* Update ViewStore.swift

* Update ViewStore.swift

* wip

* Update ViewStore.swift
2021-08-02 11:36:28 -04:00
Stephen Celis
adb1f25ab4 Store publisher should retain its view store (#652)
* Make the StorePublisher own the ViewStore.

* cleanup

Co-authored-by: Brandon Williams <mbrandonw@hey.com>
2021-07-12 13:25:27 -04:00
iampatbrown
5ca2b43bc7 Added multicast to ViewStore publisher to reduce equality checks (#624)
* Added multicast to ViewStore publisher to reduce equality checks

* Replaced multicast with ViewStore CurrentValueSubject

* Added guard check to weak self

* Clean up and add test.

Co-authored-by: Brandon Williams <mbrandonw@hey.com>
2021-07-08 12:53:30 -04:00
stephencelis
7bdd351a07 Run swift-format 2021-07-08 15:21:45 +00:00
Stephen Celis
e4225bee93 Add test for view store state access (#642) 2021-07-08 11:14:34 -04:00
Maxim Krouk
b3cf8209ba Change ViewStore state update behavior (#634)
* fix: change ViewStore state behavior

ViewStore now takes state directly from the Store

* Run swift-format

Co-authored-by: maximkrouk <maximkrouk@users.noreply.github.com>
2021-07-08 10:53:02 -04:00
Stephen Celis
e7e222f1ff Store.scope/StorePublisher Performance Improvements (#616)
* Scope fix

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* revert

* wip

* wip

* wip

* fix

* wip

* wip

* wip

* wip

* wip

* wip

Co-authored-by: Brandon Williams <mbrandonw@hey.com>
2021-06-27 21:30:43 -04:00
Brandon Williams
9716a3247a Improve some docs. (#597)
* Improve some docs.

* wip

* Update Sources/ComposableArchitecture/Store.swift

Co-authored-by: Stephen Celis <stephen@stephencelis.com>

* Update Sources/ComposableArchitecture/Store.swift

Co-authored-by: Stephen Celis <stephen@stephencelis.com>

* Update Sources/ComposableArchitecture/Store.swift

Co-authored-by: Stephen Celis <stephen@stephencelis.com>

* Update Sources/ComposableArchitecture/Store.swift

Co-authored-by: Stephen Celis <stephen@stephencelis.com>

* Update Sources/ComposableArchitecture/Store.swift

Co-authored-by: Stephen Celis <stephen@stephencelis.com>

* Update Sources/ComposableArchitecture/Store.swift

Co-authored-by: Stephen Celis <stephen@stephencelis.com>

* Update Sources/ComposableArchitecture/ViewStore.swift

Co-authored-by: Stephen Celis <stephen@stephencelis.com>

* 110 column

* update link

* add docc to switchstore

Co-authored-by: Stephen Celis <stephen@stephencelis.com>
2021-06-15 10:33:52 -04:00
Wendy Liga
1a8bccc62e Support DocC Xcode 13 (#591)
* wip

* finish

* revert back code snippet identation to 5

* Update Sources/ComposableArchitecture/Effect.swift

Co-authored-by: Brandon Williams <135203+mbrandonw@users.noreply.github.com>

Co-authored-by: Brandon Williams <135203+mbrandonw@users.noreply.github.com>
2021-06-14 14:10:08 -04:00
Krzysztof Siejkowski
1d1ce31471 Convenience initialised for stateless ViewStore (#349) 2021-03-19 11:48:55 -04:00
Nick Sillik
3ab944e6aa Explicitly define objectWillChange on ViewStore. (#353)
* Explicitly define `objectWillChange` on `ViewStore`.

Because the `ViewStore` no longer uses `@Published` variables, the
conformance to `ObservableObject` no longer sythesizes the
`objectWillChange` property on `ViewStore` in iOS 13.0 or 13.1.

This caused `ViewStore` changes to not propagate, leading to views never
updating on these OS versions. This fixes issues #334 and (the already
closed) #238.

* Apply suggestions from code review

* Update Sources/ComposableArchitecture/ViewStore.swift

Co-authored-by: Stephen Celis <stephen.celis@gmail.com>
2021-01-18 17:09:44 -05:00
Stephen Celis
2b8fb04782 Fix Binding animations (#338) 2021-01-08 14:08:39 -05:00
Brandon Williams
c1f88bd860 Fix docs for ViewStore.binding overload. (#321)
* Fix docs for ViewStore.binding overload.

* wip

* Update Sources/ComposableArchitecture/ViewStore.swift

Co-authored-by: Stephen Celis <stephen@stephencelis.com>
2020-11-15 17:38:43 -05:00
Stephen Celis
13cb3c3165 Update CI to include Xcode 12 (#266)
* Update CI to include Xcode 12

* Use CurrentValueSubject
2020-08-27 12:23:12 -04:00
Stephen Celis
e75904c180 Store can use @Published again (#239)
* Store can use @Published again

As of the third beta, assign(to:) takes an `inout Publisher.Publisher`,
so it no longer surfaces an escape hatch through which one could mutate
a store's state.

Fixes #238.

* Fix tests.

* Update ci.yml
2020-07-29 13:48:57 -04:00
Stephen Celis
a8a7c40029 Xcode 11.6/12 CI (#206)
* Run CI against Xcode 12

* Also run against 11.6

* CurrentValueSubject

* Fix

* Update ci.yml
2020-07-07 11:09:51 -04:00
Stephen Celis
2ce84cce79 Don't use @Published for ViewStore state (#199)
* Don't use @Published for ViewStore state

* Update ci.yml

* Update format.yml
2020-06-25 12:51:02 -04:00
Danny Hertz
fc42693ac3 Move ViewStore into root ComposableArchitecture directory (#189) 2020-06-18 07:07:33 -05:00