AnyTransition with Animation not working properly #2077
Unanswered
tiagopigatto
asked this question in
Q&A
Replies: 1 comment 4 replies
-
Having that action sent from within the reducer is giving me weird behavior. I enabled |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to convert some parts of a project to TCA and I am stuck at one point which I'm not sure if it's a SwiftUI problem or just me not using TCA correctly.
I have this wrapper in SwiftUI that expects a TextView and animates it in whenever the text is changed:
Then I have my feature converted to TCA which is a Footer that shows my TextFadeIn (this is the part where I don't see the text change or animate):
The text is changed on my
reduce
function, where I start a timer when my view appears:I've tried creating the view with the animations/transitions instead of calling the function but it was really buggy. Sometimes the animation worked correctly, sometimes the text wouldn't change at all:
Things I've noticed that didn't get me anywhere:
.onAppear()
and.onDisappear()
view modifiers to be called. This doesn't happen when the text is controlled by a TCA state;.animation
from the transitions seems to get me closer to where I want but I still get inconsistent results;I'm recently new to TCA, so I'm sorry if I'm doing anything stupid at all.
Beta Was this translation helpful? Give feedback.
All reactions