Help me please with basic atom


#1

I just started to learn react js. However, I have trouble with using atom.

I downloaded language-babel to use react syntax.

My question is that 1.is there something that I have to do in order to use language-babel packages? or just download is ok? by default I can use react syntax without setting anything?

  1. where do I have to create my file to use language-babel package? inside of language-babel package folder? or somewhere else?

  2. inside of my file can I use react syntax after importing like this?
    import React from ‘react’;
    import ReactDOM from ‘react-dom’;

Please help me… I really want to study harder but I can’t even start because of this…
Thank you !


#2

As long as it’s installed to the .atom/packages/ folder like Atom does by default, you can use language-babel without doing anything else.

where do I have to create my file to use language-babel package? inside of language-babel package folder? or somewhere else?

There are no restrictions about where you can create a file. language-babel will activate whenever a file has an extension that matches.

inside of my file can I use react syntax after importing like this?

Atom does not care about whether or not you include those import statements.


#3

Thank you very much!!!
I have one more question about atom-react-preview package.
I downloaded it to see the result of my react code.
However, it does not work. do you know why I can’t use this?


#4

You should install Node in order to preview React code. Atom contains Node, but not all packages use Atom’s Node. This one is asking for an outside Node, so whatever you install on your computer will be used by the package.


#5

However, it does not work. do you know why I can’t use this?

You posted a screenshot that contains the answer: Install Node