| ▲ | efortis 10 hours ago | |
Although the OP created it for SSR, these libraries are handy for SPAs as well. Rendering the whole DOM tree (instead of VDOMs) is a fast process. The slow part is attaching (committing) elements to the doc. e.g., I have a test of 20,000 elements which takes <30ms to render, while attaching them takes 120ms. Since the performance is mainly bound to the commit phase, libraries like these (and hopefuly a native API) help for creating simple UI frameworks. For example, a helper such as:
could be used, like:
Here's an example of using that helper:https://github.com/ericfortis/mockaton/blob/main/src/client/... | ||