📅  最后修改于: 2022-03-11 15:03:28.857000             🧑  作者: Mango
//Error:The 'const' modifier can only be used in TypeScript files.
If you're creating an instance method(method inside a class component),
then no you don't need const.
If you're creating a generic (i.e. utility) function OUTSIDE of a component,
then yes you probably should use const.