LoginSignup
0

More than 3 years have passed since last update.

posted at

【React】Material UIのアイコンが表示されない

問題

  • ReactのMaterial-UIのiconが表示されない。
XXX.js
import Icon from '@material-ui/core/Icon';
<Icon>add_circle</Icon>

スクリーンショット 2020-01-15 22.41.06.png

解決策

  • index.htmlに下記の記述を追加
index.html
<!DOCTYPE html>
<html lang="en">

<head>

  <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons" />

</head>

スクリーンショット 2020-01-15 22.41.21.png
表示された!

地味に悩みました。設定方法をきちんと理解していませんでした。
index.htmlはノーマークだった...

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
What you can do with signing up
0