Categories
Developer Tools How to Workflow

How to Allow HTML formatting in JSX with VS Code

One of the annoying quirks of writing HTML inside of a javascript file is that, by default, it doesn’t recognise that you’re actually writing HTML. In VS Code, this can be fixed by opening your settings.json and adding this option:

      "files.associations": {
        "*.js": "javascriptreact"
      }

Oh happy days!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.