Closed zxyao145 closed 4 months ago
When you call SetState()
you set the state and automatically invalidate the component (that in turn schedules a component re-rendering).
If you want to set the state without re-rendering call SetState(.., invalidateComponent: false)
(this is required when you don't want to re-render the component and usually happens when you have property linked to the state using a function like ()=>State.Counter).
If you want to re-render the component just call the Invalidate()
(this is required in some special cases).
This page can help: https://adospace.gitbook.io/mauireactor/components/stateful-components
@adospace Hi, Thank you for your reply! Through step-by-step debugging, I found that it was because the code threw an exception, which resulted in the subsequent SetState
not being re-rendered. I am a beginner on Android, and I'm not sure if this meets expectations.
Hi, same as title, how to force component re rendering?