L
L
LB7772015-03-10 16:10:53
IntelliJ IDEA
LB777, 2015-03-10 16:10:53

How to use React Templates for react.js PHPStorm/WebStorm?IntelliJ IDEA?

I came across an interesting solution for separating html and logic for react.js called React Templates
Specially for PHPStorm / WebStorm? IntelliJ IDEA has a plugin for this.
Those. I installed the plugin and installed the react-templates npm package globally .
According to the instructions, I prescribe a template and a controller, as a result, a js file for react.js is generated autonomously, and it would seem that everything is fine and the generated file is an exact copy as in the example, but does not want to run.
Those. I write to him

React.render(
            rtIfRT(),
            document.getElementById('example')
    );

for example "rt-if" and nothing happens.
At that time, if you use the example code "Hello world in React Templates" , then everything works out.
Why is that? What is wrong? And how to make it work?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question