Commit Graph
13 Commits
Author SHA1 Message Date
Evan Almloff 1530445972 fix hot reloading rsx with nested rsx calls 2022-12-22 16:38:07 -06:00
Jonathan Kelley 5673017def chore: clean up the repo some 2022-12-06 17:50:25 -08:00
Jonathan Kelley 90982e0ccb wip: start to refactor out hot reloading from packages
Also implement alternative simpler template system
2022-10-20 09:56:09 -07:00
Demonthos 047ed1e553 Subtree memorization / reactive templates (#488)
This commit adds subtree memoization to Dioxus.

Subtree memoization is basically a compile-time step that drastically 
reduces the amount of work the diffing engine needs to do at runtime by
extracting non-changing nodes out into a static "template." Templates 
are then understood by the various renderers in the ecosystem as a 
faster way of rendering the same items. 

For example, in the web, templates are simply a set of DOM Nodes created 
once and then cloned later. This is the same pattern frameworks like Lithtml
and SolidJS use to achieve near-perfect performance. 

Subtree memoization adds an additional level of complexity to Dioxus. The RSX
macro needs to be much smarter to identify changing/nonchanging nodes and
generate a mapping between the Template and its runtime counterparts.

This commit represents a working starter point for this work, adding support 
for templates for the web, desktop, liveview, ssr, and native-core renderers.
In the future we will try to shrink code generation, generally improve 
performance, and simplify our implementation.
2022-09-30 12:03:06 -07:00
Demonthos baf1807338 allow duplicate idents in format_args_f (#515) 2022-08-10 22:45:56 -07:00
Evan Almloff f1f9f0df1a pass clippy 2022-06-28 12:37:19 -05:00
Evan Almloff 7730401288 fix escape sequences in ifmt 2022-06-28 12:19:07 -05:00
Evan Almloff ffc9bf763a pass clippy 2022-06-17 13:50:41 -05:00
Evan Almloff 3cd4175e2e remove braces from captured variables 2022-06-05 08:39:50 -05:00
Evan Almloff 94448ea4aa handle formatting options 2022-05-30 18:32:57 -05:00
Evan Almloff 06390b9be5 allow rsx to be used outside of a proc_macro context 2022-05-28 12:10:32 -05:00
Evan Almloff f8143a5fc1 parse segments before to_tokens 2022-05-25 14:08:31 -05:00
Evan Almloff c7c84da8ab WIP hot reload 2022-05-25 08:58:59 -05:00