3
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

chakra-uiでloadingにloading用のステートを渡して動かない時のデバッグでやったこと

3
Posted at

はじめに

  • 公式docを見るのは大事、だがその前にさっと実験して確かな仮説を持つと飲み込みが早い

問題

  • Buttonコンポーネントのloadingにloading用のstateを渡した、loadingになるはずの条件でloading中の表示にならない

解決

  • 結論、WebAPIへのリクエスト中にloading用ステートへtrueをsetしていなかったのが原因

終わりに

結論に至るまでにやったこととして、

  1. loadingはコンポーネントの型定義からそもそも推測したもので確証がなかったので、一旦trueを渡す
  2. loading表示になったことを確認
  3. では処理側が問題だということで結論に気づいた
3
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?