←back to thread

193 points yaoke259 | 5 comments | | HN request time: 0.825s | source
Show context
lelanthran ◴[] No.45024882[source]
Maybe I'm not understanding, but why is this "Turn Markdown into React/Svelte/Vue UI" and not "Turn Markdown into HTML"?

I'm not seeing the value of generating React, Vue or Svelte as opposed to generating DOM components.

replies(7): >>45024990 #>>45025096 #>>45025261 #>>45025292 #>>45025332 #>>45029796 #>>45030644 #
1. jy14898 ◴[] No.45025096[source]
It tickled me seeing the streaming example, thinking about how much better HTML deals with streaming
replies(1): >>45025380 #
2. yaoke259 ◴[] No.45025380[source]
html does not allow for event handling, this allows for secure listening of the events at runtime, which afaik is not possible with html
replies(2): >>45025425 #>>45027658 #
3. mpalmer ◴[] No.45025425[source]
Modern frontend frameworks wouldn't exist without JS events, not the other way around. You can absolutely do this with vanilla HTML+JS.

https://developer.mozilla.org/en-US/docs/Web/API/Event

replies(1): >>45025463 #
4. yaoke259 ◴[] No.45025463{3}[source]
I suppose a vanilla js version is possible? I'll need to look into this
5. paceaux ◴[] No.45027658[source]
You really might want to look into what the DOM is and how it works.

When HTML reaches the browser, all the markup is parsed, and the browser creates a Document Object Model (https://developer.mozilla.org/en-US/docs/Web/API/Document_Ob...). That object model is an extremely robust API that's loaded with tons of functionality, not the least of which is working with events (https://developer.mozilla.org/en-US/docs/Web/API/Document_Ob...).

The browser itself brings so much functionality that you can do stuff like check the status of the battery; create, save, and access files; get someone's precise lattitude and longitude; and _create and subscribe to streams_.

I'm not sure what you mean by, "html does not allow for event handling," ... but if HTML exists in a browser at all, there's plenty of event handling to go around.