What about converting JSX to JSONX ?
asgeo1 opened this issue · 1 comments
asgeo1 commented
It's really neat that this library allows React components to be rendered from JSON.
But what about going the other way? i.e. starting with JSX and converting that to JSONX syntax?
I have this idea where a user writes some JSX code (perhaps in web-based GUI), and then I'd like to serialize it to JSONX, so it can be stored in a database. Then I'd be able to send it via an API to some other app, where it can be translated back to JSX and rendered.
is that possible with this or any other library?
yawetse commented
I think it is possible, it would probably involve taking a look at babel/typescript JSX parsers that convert JSX to React.CreateElement etc - updating the transpiler to JSONX
I might tinker around with this later