React normally, react-dom. Use react to insert components into a jsp page and report syntax errors. Can react be used in jsp? If it can be used, how should it be used? ?
PHP中文网2017-06-14 10:55:46
First of all, you have to determine whether the react in your jsp page is written in es6 or es5. If you just want to use react in the jsp page, introduce the two packages react and react-dom and follow Ruan Yifeng's tutorial. Write, use es5 syntax to write
黄舟2017-06-14 10:55:46
Essentially it is possible, because they are all js code. The reason for saving may be that the latest version of react uses es6 syntax, but your browser does not support it. You can always use Babel to convert your react code to es5