umi icon indicating copy to clipboard operation
umi copied to clipboard

[Bug] useModel 内出现 useSearchParams 运行异常

Open tolerance-go opened this issue 1 year ago • 0 comments

What happens?

在 model 定义里如果出现 useSearchParams 会导致 useModel 它时第二个参数的 model 短暂为空

image

Mini Showcase Repository(REQUIRED)

Please provide a minimal reproduction then upload to your GitHub. 请提供 最小重现,并上传到你的 GitHub 仓库

How To Reproduce

  1. model hook 中使用 useSearchParams
  2. useModel 该 model 提供第二个参数 pick

Steps to reproduce the behavior: 1. 2.

Expected behavior 1. 2.

Context

  • Umi Version:
  • 4
  • Node Version:
  • 16.6
  • Platform:
  • macOS

tolerance-go avatar Jul 14 '22 15:07 tolerance-go