Closed sunpm closed 9 months ago
The useLoading
hook has been updated to enhance its structure and usage. It now consistently returns a pair of methods, showLoading
with a new optional parameter and hideLoading
, to manage loading states more intuitively. This change streamlines the API and eliminates the need for separate function calls to hide loading states.
File(s) | Change Summary |
---|---|
README.md , src/useLoading/index.ts |
Refactored useLoading to return showLoading and hideLoading ; removed separate hideLoading call; added optional parameter to showLoading . |
In the realm of code, where rabbits hop, A hook was changed at the loading dock. Show and hide with a single flip, 🥕 munching, let's sail this ship! ⛵
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Thank you!
Description 描述
uni.showLoading()
是一个单例,uni.hideLoading()
不需要依靠调用showLoading
再返回。我将它们两个一起返回,可以少一行const
的操作😊Linked Issues 关联的 Issues
Additional context 额外上下文
Summary by CodeRabbit
useLoading
functionality for better handling of loading states with optional parameters.