1
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?

[MISSING_EXPORT] "forwardRef" is not exported by "node_modules/@chakra-ui/react/dist/esm/index.js". ╭─[ node_modules/@chakra-ui/icons/dist/esm/Spinner.mjs:2:10 ]

1
Posted at

はじめに

  • chakra-uiのIconButtonでハンバーガーメニューを適用できなかった

問題

  • これでiconというプロパティがないとも言われるし、開発サーバー起動時に表題のエラー
import { HambergerMenu } from "@chakra-ui/react"

<IconButton aria-label="Menu" icon={HambergerMenu} />

解決

  • childrenにするのと、react-iconを使うことで解決
import { GiHamburgerMenu } from "react-icons/gi";

<IconButton aria-label="Menu">
  <GiHamburgerMenu />
</IconButton>

終わりに

公式ドキュメントでchildrenになっている実装例

react-iconsなどを使うと良いというissue

react-iconsのハンバーガーメニュー

1
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
1
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?