Summary
We have now completed everything we had to learn about async data and component loading. We started the chapter by removing the hardcoded posts
and replacing them with dummy data that is loaded dynamically. We then fixed the property mismatch caused by the data change, learning how to prevent this in the future by improving the use of property typing and validations.
Then, we learned how to change our data flow to load comments on demand and defined when this should be used, as well as the performance and user experience benefits that this brings. We then introduced another feature related to async operations, watch
. We used this feature to trigger a side effect and automatically load more posts when the number of posts reaches a certain number.
Lastly, we learned how to create and handle asynchronous components. We described what makes an async component and changed our Companion App to ensure our comments were fetched before loading the component. We concluded the chapter...