4 ms·
Eh, not really. I can straight-up embed the source of this and run with it if I want something that's html++ rather than "a new JS project". I know the API, bec
by neetle 5y ago
Eh, not really. I can straight-up embed the source of this and run with it if I want something that's html++ rather than "a new JS project". I know the API, because the source is simple. It's a small tool, for small jobs.
There is nothing wrong with choosing the simpler option.
- kiliancs 5y agoSo they are not exactly the same tool, but you can embed it and run with it, and use for some parts of your page, for example.
- KrishnaShripad 5y agoI am sorry but what exactly is not possible with React? It is literally the same API. To prove to you, I used the same code Xena used in the article and reproduced it with React: https://codesandbox.io/s/mutable-water-y385q?file=/index.html https://codesandbox.io/s/mutable-water-y385q?file=/index.htm... No compilation. No build. Nothing. Same API too.
- rakoo 5y agoIt's not the same thing. GP says that the entire source code of xena can be directly copy-pasted in your business javascript code, or even in your html; no need for imports, no need for CDNs, a process under control from beginning to end. What you're proposing is essentially saying "look, it's easy to fly, here's how you do it in python": import antigravity def main(): antigravity.fly() if __name__ == '__main__': main()
- KrishnaShripad 5y agoNope. Have you actually looked at Xena's source code? She actually imports her own library: `import { g, h, x } from "/static/js/xeact.min.js";` Please see her source as I have used the same source, sans her library, to replicate it with React. Instead of importing from "/static/js/xeact.min.js", I am importing React. There is literally no other difference. > can be directly copy-pasted in your business javascript code Why can't you do the same with React? You literally can copy-paste entire React code in your HTML. Nothing stops you from doing that. Doesn't matter if you import it as a file or inline it in your HTML. It is plain old Javascript at the end of the day.