taro-hooks v1.5.0

651 阅读2分钟

10 月, taro-hooks又发布了 2 个版本(其中包含 1 个修复补丁和 1 个小版本). taro-hooks基本保持着每周发布一个版本的频率在维护更新. 目前taro-hooks已经拥有 52+hooks可供使用。覆盖了将近 75%的官方api.

目前taro-hooks最新版本为v1.5.0.(这个月比较忙。基本没怎么写东西)

概要

此次更新了近 3 个 hooks, 新增hooks为:

其他

  • 扩充useRouter, 结合useFrom增加来源页面信息.
  • 修复部分hook返回实例定义
  • 修复部分hook返回默认初始值
  • 增加部分FAQ类型不存在说明.

更新日志

Bugfix & Improvment

  • hook type: fix default value of some hook instance (28b96f8)
  • usemenubuttonboundingclientrect: fix typeof useMenuButtonBoundingClientRect result (a25d76c)
  • usesysteminfo: fix typeof useSystemInfo result (db30a1b)
  • useupdatemanager: fix return instance of useUpdateManager (92d99ca)
  • share & default: add share func for request feature & fix some default of hooks (879ca4b)

Feature

  • useble: add useBLE (9d60c08)
  • useble: add useEffect code for useBLE (615a23a)
  • usebluetooth: add doc and type for useBluetooth (7f1b80b)
  • usebluetooth: add useBluetooth (931d7f4)
  • usefrom: add useFrom hook (248157d)
  • userouter: add from info for useRouter (c2631f6)

更多更新日志请查看

推荐

  1. dragula
    兼容性和使用感都不错的拖拽库. 官方还提供了大量示例以及配合框架使用的 demo.

  2. 淘宝 NPM 镜像站换新域名

    • 相关优化

      • 启动新的域名。
      • Registry 全面重构,提升稳定性,降低同步失败率。
      • CLI 优化,提升安装速度,去掉软连接等带来的兼容性问题。
      • 沉淀自企业级大规模应用的使用经验手册。
    • 迁移方案

  3. Toward Hermes being the Default
    In this post, we want to highlight some of the most exciting progress we've made over the past two years to push Hermes towards being the best JavaScript engine for React Native. Looking forward, we are confident that with these improvements and more to come, we can make Hermes the default JavaScript engine for React Native across all platforms.

  4. apexcharts
    📊 Interactive JavaScript Charts built on SVG
    一个轻量的 SVG 图表解决方案

  5. color
    Color space conversion & manipulation lib.
    关于颜色转换的操作库.

  6. excalidraw-animate
    A tool to animate Excalidraw drawings
    excalidraw 算是笔者最喜欢的流程绘画库了. 而 excalidraw-animate 可操作 excalidraw 产物(画板信息)并利用当前的绘制顺序生成动画 SVG.

  7. shoelace
    一个多框架适用的 PC 组件库. 风格感觉有点介于 Material 和日常风格之间的感觉.组件比较丰富.