question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Automatically inserting JSX closing element in TypeScript JSX file

See original GitHub issue

Currently, when users type non self-closing JSX tag, they will have to type corresponding closing JSX tag. In this situation, our language service can help the users by automatically insert the corresponding JSX tag. The newly inserted tag should respect existing format and If the matching closing tag exists, the closing tag should not be insert.

var x = <div> [insert by language-service] </div>
var y =
<div>
[insert by language-service]</div>
var z = 
    <div>
     [insert by language-service] </div>

Issue Analytics

  • State:open
  • Created 8 years ago
  • Reactions:8
  • Comments:27 (5 by maintainers)

github_iconTop GitHub Comments

8reactions
michaelrinderlecommented, Oct 23, 2020

bump. ^^^ still a problem with VS2019. shouldn’t the premium IDE have an auto close on HTML tags in JSX/TSX files???

7reactions
mk-16commented, Nov 24, 2021

Solved it !!! I don’t know how can I record it, but simply said in Visual Studio (Community at least) Tools => Options => Text Editor => JavaScript/TypeScript => Intellisense uncheck the box “Only use Tab or Enter to Commit”

hope this works and makes your day

Read more comments on GitHub >

github_iconTop Results From Across the Web

Visual Studio 2019 JSX closing tag autocomplete
I am attempting to use the new Visual Studio 2019 on a Typescript React project and came across an issue with autocomplete when...
Read more >
React (jsx/tsx) tags auto-close does not work
React Component tags and HTML tags auto-close feature does not work in tsx/jsx files. Visual Studiowindows 10.0visual studio 2017 version 15.6.
Read more >
JSX In Depth - React
Specifying The React Element Type​​ The first part of a JSX tag determines the type of the React element. Capitalized types indicate that...
Read more >
Documentation - JSX - TypeScript
Additionally the output will have a .jsx file extension. The react mode will emit React.createElement , does not need to go through a...
Read more >
React | WebStorm Documentation - JetBrains
To use TSX instead of JSX, select the Create TypeScript project checkbox. WebStorm will generate .tsx files for your application and a ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found