How to fix error 'FB' is not defined no-undef on create-react-app project?

后端 未结 5 988
隐瞒了意图╮
隐瞒了意图╮ 2020-12-30 02:51

I made the project using this link as my starting file.

https://github.com/facebookincubator/create-react-app

But after i tried to make Facebook login button

5条回答
  •  自闭症患者
    2020-12-30 03:20

    ESLint doesn't know that the variable FB is a global. You can declare a variable you referenced as a global by adding the following to the top of your file:

    /*global FB*/

    For more information, check out the "Rule Details" section on the official ESLint docs: http://eslint.org/docs/rules/no-undef

提交回复
热议问题