Skip to content

Lazy dependencies and Environments #412

Answered by stephencelis
bielikb asked this question in Q&A
Discussion options

You must be logged in to vote

My issue here is that If I wouldn't keep the reference to the instance of MeetingEnvironment that initialises the ScrumTimer, the ScrumTimer would be deinitialised as soon as the pullback closure would be called

Do you have an example of this? Reducer.pullback captures a transformation of a global environment into a more local one, but that global environment should be as long living as your app's store, so the scrumTimer shouldn't ever be deinitialized.

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@bielikb
Comment options

@bielikb
Comment options

@stephencelis
Comment options

@bielikb
Comment options

Answer selected by bielikb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants