Hi guys,
Let’s say I have a page containing a button and a component and I want to modify the state of the component based on the click event of the button. The way I’m doing it is having a shared property in controller which gets updated on the button click event and is also passed onto the component as a parameter. Inside the component, didRecieveAttrs() calls some methods to update component state.
The problem is that the updation of component state inside didRecieveAttrs() takes a lot of time (some heavy computation involved). So, when I click on the button it gets stuck until the component is reloaded. Is there any way I can introduce a loading state to the component so that it’s not stuck on the click event.
1 post - 1 participant