Hello! Quick question… I’m building a webapp using...
# compose-web
s
Hello! Quick question… I’m building a webapp using compose web and I wanted to know if there is a tool of command line argument to help diagnose why the website was completely reloaded? Why a component is redrawn? Thanks 🙂
m
As far as I know there isn't a way to figure out why a component was redrawn. What I like doing is adding some "println" statements and checking what I'm doing on the page to cause the component to be redrawn.
s
Thanks! I’ll double check but pretty sure where it’s happening. I have a localization service and when I change language, the whole site is reloaded when I would think only redraw the strings 🤔 🤷🏻‍♂️
d
Try to use more composable methods, if you have a lot of code in a single method, it will redraw everything inside
What you can do is create a modifier extension that will print something when redrawing