The 'const' modifier can only be used in TypeScript files.ts(8009)

Do you have a question? It’s hard for the lovely folks here to say much without context and information.

i don’t get how to fix this error.

How did you get the error? What are you trying to do? We need information.

I’m trying to build a weather identifier app…for search input , i have made this file…where i can style that and further work for search input box.

Are you using typescript? Do you intend to be using typestript? If not, then this could be an invalid declaration.
Otherwise, it could be an issue with the settings of your editor.

1 Like

Welcome, Sarojh.

It is likely you need to include ES2015 in your babel config.

Is it inside the component? If so try moving it out of the component.