Using React Fragments in Visual Studio Code 2019

Photo by Jason Leung on Unsplash

About React Fragments

The problem

// Visual Studio Version:
Version: 1.39.2
Commit: 6ab598523be7a800d7f3eb4d92d7ab9a66069390
Date: 2019–10–15T15:33:00.827Z
// The stack used for compilation as it appears in package.json.
“@babel/core”: “7.4.4”,
“@babel/preset-react”: “7.0.0”,
“@babel/preset-typescript”: “7.3.3”,
“babel-loader”: “8.0.6”,
“webpack”: “4.39.3”,
"react": "^16.8.6",

The research

The problem breakdown:

The fix:

Notes:

Screenshots

Syntax broken — Language set to Javascript (Babel) in Visual Studio Code
Syntax fixed — Language set to Typescript React in Visual Studio Code

Organic, fair-sourced DevOps and Full-Stack things. This is a BYOB Establishment — Bring Your Own hipster Beard.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store