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.

gatsby.jsのwarning解消法

Posted at

warningが出ており、エラーではないので表示には支障ないが、警告が出ていた箇所を対応。
その対応方法について備忘録。

warning① 関数名をつける

Fast Refresh to not preserve local component state.

       Please add a name to your function, for
example:

       Before:
       export default () => {}

       After:
       const Named = () => {}
       export default Named;

修正前

export default () => {

}

修正後

Containは任意の定数名でOK

const Contain () => {

}
export default Contain
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?