3 ms·
Interesting. So libraries like Vue and React only work with Node? Why aren't they cross compatible with the different runtimes?
by emehex 5y ago
Interesting. So libraries like Vue and React only work with Node? Why aren't they cross compatible with the different runtimes?
- acemarke 5y agoThis is mixing up a few different things. Vue and React are primarily client-side frameworks, intended to run in a browser. They expect that the Document Object Model (DOM) APIs be available, so that they can update parts of the current page based on your components. However, they can also be used for "server-side rendering", using the same component definitions to generate an HTML string and return it (similar to how you might generate HTML via templates in a typical server framework like Rails or Django). I know just enough about Deno to know that there are technical differences between how Deno and Node handle defining and loading JS module files, and that might have implications on whether Deno can handle loading libraries like React and Vue as they're currently packaged and published.
- emehex 5y agoOkay! Thanks for the clarification. I was imagining React as like a library akin to Flask and that it could only work with Node and not Deno. But I understand now that this is the wrong way to think about it.