NOTE: This project has been migrated to Kotlin Mutliplatform, and the artifact id uploaded to Maven central has been changed to hooks2
Please see the wiki for migration notes
- upgrade kotlin -> 2.1.0
- fix #25
- optimization
- migrate to KMP #26
- Reduced the use of tuples as return types for hooks
- Introduced new parameters
debounceOptionsOf
andthrottleOptionsOf
inRequestOptions
- Extended set/get delegate functions for
PersistentHolder
,Ref
, andMutableRef
- Refactored
usePersistent
- Refactored
unwrap
- Exposed
HooksEventManager
to allow communication between non-Compose and Compose sides via events - Added a new hook:
useImmutableList
- Refactored
useRequest
- fix: #29
- deprecated hooks are marked as private
- breaking change: use
State<T>
to wrap the return value of hooks - breaking change: Some set function property types changed from
StateValueFn<T>
toStateValueFn<Either<T, (T) -> T>>
注意:该项目已迁移到 Kotlin Mutliplatform,上传到 Maven central 的工件 ID 已更改为 hooks2
请参阅 wiki 了解迁移说明
- 升级 kotlin -> 2.1.0
- 修复 #25
- 优化
- 迁移到 KMP #26
- 减少了使用元组作为钩子的返回类型
- 在
RequestOptions
中引入了新参数debounceOptionsOf
和throttleOptionsOf
- 扩展了
PersistentHolder
、Ref
和MutableRef
的 set/get 委托函数 - 重构了
usePersistent
- 重构了
unwrap
- 公开了
HooksEventManager
以允许非 Compose 端和 Compose 端通过事件进行通信 - 添加了新钩子:
useImmutableList
- 重构了
useRequest
- 修复:#29
- 弃用的钩子被标记为私有
- 重大更改:使用
State<T>
包装 hooks 的返回值 - 重大更改:一些设置函数属性类型从
StateValueFn<T>
更改为StateValueFn<Either<T, (T) -> T>>