1

I'm trying to make an atom plugin from scratch. I am using etch for the use of virtual DOM in atom which gives me coding environment like react. Whenever I'm trying to run the package, it says React is not defined, although React is not used in etch and it is not present in the package.json file of the etch. How can I solve this?

Ajay Gaur
  • 5,140
  • 6
  • 38
  • 60

1 Answers1

1

By default JSX uses React.

You need to add /** @jsx etch.dom */ to the top of your file.

This tells JSX that <div> needs to become etch.dom('div', {})

Arcath
  • 4,331
  • 9
  • 39
  • 71