3

I have a live template useS for

const [$VAR1$, set$VAR2$] = useState($END$);

where useState is an external variable that has to be imported like so:

import { useState } from "react";

Whenever this template is used, the import should be automatically added to the current file at the top.

The template is used within JS functions, therefore I can not just add an import to the live template, since the import will be placed inline then.

Is there a special pattern for that?

LazyOne
  • 158,824
  • 45
  • 388
  • 391
henk
  • 2,677
  • 2
  • 18
  • 49

1 Answers1

2

Doesn't work currently, please follow WEB-37425 for updates

lena
  • 90,154
  • 11
  • 145
  • 150