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

More than 1 year has passed since last update.

Reactでindex.js:1 Warning: Received true for a non-boolean attribute outline.が出た時の対処法

Posted at

エラー内容

index.js:1 Warning: Received `true` for a non-boolean attribute `outline`.

If you want to write it to the DOM, pass a string instead: outline="true" or outline={value.toString()}.
    at button
    at http://localhost:3000/static/js/vendors~main.chunk.js:22611:3
    at div
    at ModalArea (http://localhost:3000/static/js/main.chunk.js:1951:5)
    at Portfolios
    at Route (http://localhost:3000/static/js/vendors~main.chunk.js:61799:29)
    at Switch (http://localhost:3000/static/js/vendors~main.chunk.js:62001:29)
    at Router (http://localhost:3000/static/js/vendors~main.chunk.js:61430:30)
    at BrowserRouter (http://localhost:3000/static/js/vendors~main.chunk.js:61051:35)
    at App

コード

<Button
  outline block
  color={buttonColor}
  className="mb-3 btn-sm"
  onClick={toggle}
  >{buttonName}
</Button>

原因

outlineblock が存在するため。
以下のようにoutline blockを削除することでエラーが解決した。

<Button
  color={buttonColor}
  className="mb-3 btn-sm"
  onClick={toggle}
  >{buttonName}
</Button>
0
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
0
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?