ParkingReformNetwork / parking-lot-map

Interactive map showing how much of downtowns are dominated by parking
https://parkingreform.org/parking-lot-map/
MIT License
1 stars 5 forks source link

Add `Observable.initialize()` #255

Closed Eric-Arellano closed 1 month ago

Eric-Arellano commented 1 month ago

Before, you had to explicitly call every subscriber with the initial state. Now, you can call myObservable.initialize() to do that.

Beyond DRY, this is helpful to encapsulate who the subscribers are. For example, for the selectedCity observable, we'll have subscribers from several files and we don't want to have to couple them all together.