1

I just set up the default React/Redux application using visual Studio 2017 (File --> New Project -> ASP.NET core Web Application -> React/Redux. I made no edits to the created project. It runs on IIS Express fine, but when I go and look at the code, there's a bunch of red lines. It doesn't seem to recognize React/Redux syntaxs, as shown in the images below.

I looked around but couldn't find any packages or solutions to this problem. It makes it very hard to debug my code. Does anyone know of a fix? I don't want to use VS Code because it doesn't have resharper.

Not recognizing react/html syntax

Not recognizing reducer syntax in redux

Edit: still not working. All node.js development packages are already installed.

Aiyuni
  • 780
  • 5
  • 15
  • 1
    Possible duplicate of [Visual Studio 2015 JSX/ES2015 syntax highlighting](https://stackoverflow.com/questions/34097915/visual-studio-2015-jsx-es2015-syntax-highlighting) – UjinT34 Mar 22 '19 at 16:31
  • Looked at it, the workload was already installed. No fix found. Still looking for a solution to this. – Aiyuni Mar 22 '19 at 17:09
  • Doesn’t have resharper? Lint + prettier is more than enough. Nonetheless, you should be able to work without one or the other and not be dependent on its tooling. – Nicklas Pouey-Winger Mar 22 '19 at 20:56

1 Answers1

5

Rename your .js files as .jsx files to fix this issue.

Aiyuni
  • 780
  • 5
  • 15