Skip to content

Should ifLet(then:else:) call else block for initial nil? #492

Answered by mluisbrown
mluisbrown asked this question in Q&A
Discussion options

You must be logged in to vote

I had a deeper look at this, and it turns out that suppressing the else block for an initial nil is probably not such a good idea after all. For one, it would remove the ability to do this kind of thing. Here the initial nil is used to show a loading spinner in a navigate then load scenario.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by mluisbrown
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant