Supressing runtime warnings #3082
vladyslavsosiuk
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
Hi @vladyslavsosiuk, we discussed this today, and while we do think surpassing runtime warnings is probably a good thing to eventually add, it will take some time. There is also the possibility of us exposing public information on the store about whether or not it is still "active". That would allow you to check if some parent or grandparent state has already been No timeline on that, but it's something we would like to do. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
TCA generates various runtime warnings, which are often quite informative, but they can sometimes be false positives. For example, if we wish to send an action when the view disappears but is not actually dismissed, the onDisappear closure will always be invoked when the view is dismissed as well. There is no way to avoid these warnings other than to construct an ad hoc solution that would observe the view being disappeared based on some other data in the state (for example, when its destination becomes non-nil). But that approach is pretty non-solid. For example, if such a view is placed in a tab view and the tab is changed, it requires observing tab selection in the tab view parent reducer to observe disappearance, and there may be others. @mbrandonw noted implementing a 'withoutWarnings' function to ignore such warnings. We could wrap sending actions from the onDisappear closure in such function so we could suppress the warnings that we are aware of and don't want to have them in the issue navigator since they may jumble with true warnings that one can miss due to the large number of them.
Here is a link to the discussion in Slack:
https://pointfreecommunity.slack.com/archives/C04KQQ7NXHV/p1715628109148009
Here is a link to a PR that prototypes the function:
#3081
Beta Was this translation helpful? Give feedback.
All reactions