Open lijianying10 opened 6 years ago
@lijianying10 I'm a little clear what the use case is here.
Not long ago we merged a change to improve the core React element generator, which also generates the JSX "half" too.
We will ultimately move to generating based on the HTML 5 spec, which will mean we get full coverage on elements and attributes
Does the current master make things better in your opinion?
In package
react/jsx
too many tags not implementation.Since that, I have added a new function
CreateElementFromJS
after several days of usage. And it works well.How to use this function
First install NPM dependance
Write JSX file and compile it
Definitely
babel
will watch source code change and auto compile it intojs
.Import
someComponentGen.js
to index.htmlUsage in Go
Example: someComponent.jsx
Then in go
conclude
It's much more clear for manage components and convenience upgrade webpage.