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.

3
  • 1
    Possible duplicate of Visual Studio 2015 JSX/ES2015 syntax highlighting Commented Mar 22, 2019 at 16:31
  • Looked at it, the workload was already installed. No fix found. Still looking for a solution to this. Commented Mar 22, 2019 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. Commented Mar 22, 2019 at 20:56

1 Answer 1

5

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

Sign up to request clarification or add additional context in comments.

1 Comment

Holy bat fix batman! Thnx

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.