> And things such as E4X already exist. Building on that, JSX is just a code transformation that can be used without React. You can swap React out for another compatible library with a pragma: https://babeljs.io/docs/en/next/babel-plugin-transform-react-jsx#pragma -- JSX + a React-like library that creates vanilla DOM elements could be used to achieve a lot of the requested functionality
On Sat, May 18, 2019 at 4:01 AM ViliusCreator <[email protected]> wrote: > > XML in JS without React could totally bring usage in Node js, not only JS. > For example, you could pass XML object as parameter to website from server > and server would change it to right way, so XML object would be turned to > HTML element. > However, in non web-development environment, it would have no usage. Since > sometimes Node js is used for general-purpose and not web-development, XML > would be practically useless and JSON would be used. And things such as E4X > already exist. > The benefit of XML is that you can do `<a b=”c”>d <e></e></a>`(which is > equivalent to > > ```json > { > ‘//name’: ‘a’, > ‘//inner’: [‘d ’, {...}], > b: ‘c’ > } > ```) and it’s more readable than JSON version of it.` > > > Virus-free. www.avast.com > _______________________________________________ > es-discuss mailing list > [email protected] > https://mail.mozilla.org/listinfo/es-discuss _______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

