Closed layik closed 4 years ago
So I have found the way to do this.
The only way to do this, is to have a precompiled version of the code in ES as stated by the React docs, and import into the browser with a standard <script src='react_no_jsx.js'>
. I would like to keep my code in JSX and there is a good reason for it (human readability and conciseness). In our case a 251 line is transpired into 325.
But providing docs for this would mean a considerable amount of work. Example section below.
To clarify:
geoplumber.html
react.js
(as in the example above)data.js
)But I see little value in the whole exercise I must say.
This is not useful even if done. Revisit if need be.
Update, this is not "straightforward" and requires removing the
jsx
pattern of writing the JS code which is preferred in my coding style. It may need a rewrite of the current "standalone" template file.