Commit graph

79 commits

Author SHA1 Message Date
Demonthos
3b7b503333
Refactor Mutations and simplify Templates (#578)
* update mutations to be path based rather than renderer integrated
2022-10-18 14:42:45 -07:00
saicu
e8c48d46cf
replace fxhash crate with rustc-hash (#588) 2022-10-12 18:27:26 -07:00
Demonthos
daeffd4149
pass clippy (#575) 2022-10-02 14:12:24 -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
Jon Kelley
28fba42e7e
feat: add an unhygenic render macro (#556)
* feat: add an unhygenic render macro

* chore: use render instead of rsx!(cx,
2022-09-25 01:05:16 -07:00
Demonthos
2d08532bad
Improve documentation for the native core and native core macro crates (#528)
* improve documentation for the native core and native core macro crates

* fix spelling of depenency
2022-09-06 17:25:10 -07:00
Jon Kelley
d9546d9504
Renderers are now packages, not features. (#387)
* feat: use synchronous router design

* feat: function to get router out of dom

* chore: restructure workspace to use renderers as packages, not features
2022-07-09 15:15:20 -04:00
Demonthos
4a5ae758ee
Allow Multiple dependencies for states in the RealDom (native core) (#412)
* WIP multable deps

* WIP: refactor and genralize state macro

* add traversable trait

* update tui to use elementid to index dom
2022-07-07 00:50:22 -04:00
Evan Almloff
041f474329 Merge remote-tracking branch 'upstream/master' into clean_up_rsx_imports 2022-06-26 07:22:55 -05:00
Evan Almloff
6c20d74797 finish cleanup 2022-06-25 08:48:03 -05:00
Evan Almloff
fbf8e13b8d clean up imports 2022-06-25 08:27:10 -05:00
Jonathan Kelley
8be66bd34d fix: apply some clippy lints and rename the liveview methods to not intersect 2022-06-20 02:24:39 -04:00
demonthos
bd105c9bc6 Merge remote-tracking branch 'origin/master' into tui_focus 2022-05-07 14:08:10 -05:00
Reinis Mazeiks
85aa4584ff Fix: expose AttributeValue; update tests to pass 2022-05-07 13:43:40 +03:00
Evan Almloff
7a17683447 add persistant iterator to native core 2022-05-03 11:01:49 -05:00
Jonathan Kelley
cf378d34d8 fix: add version for package 2022-05-03 00:03:31 -04:00
Jonathan Kelley
85a09314a6 chore: fill out cargo meta 2022-05-03 00:02:09 -04:00
Jonathan Kelley
3febd42588 Release dioxus-core v0.2.1, dioxus-core-macro v0.2.1, dioxus-html v0.2.1, dioxus-interpreter-js v0.2.1, dioxus-desktop v0.2.3, dioxus-hooks v0.2.1, dioxus-liveview v0.1.0, dioxus-native-core v0.2.0, dioxus-native-core-macro v0.2.0, dioxus-router v0.2.3, dioxus-ssr v0.2.1, dioxus-tui v0.2.2, dioxus-web v0.2.1, fermi v0.2.1, dioxus v0.2.4 2022-05-02 23:57:20 -04:00
Evan Almloff
cebf17088b fixed infinite loop in union_ordered_iter 2022-04-20 12:17:16 -05:00
Evan Almloff
7c30d93a3d nested state 2022-04-19 20:12:57 -05:00
Evan Almloff
b79a58cc66 pass clippy 2022-04-17 08:43:15 -05:00
Evan Almloff
b9c2664089 add builder methods to NodeMask 2022-04-16 17:22:03 -05:00
Evan Almloff
436c6a02f7 add node dependancy 2022-04-16 12:27:52 -05:00
Evan Almloff
0fb9aed273 add children on initial build and add sorted slice macro 2022-04-13 12:49:53 -05:00
Evan Almloff
3b06059834 fix rendering 2022-04-13 11:39:38 -05:00
Evan Almloff
9eaf7212a3 tests passing, and tui updated 2022-04-12 18:46:16 -05:00
Evan Almloff
92010b0bab WIP update tests 2022-04-12 07:51:57 -05:00
demonthos
9e9fc09e6d WIP macro progress 2022-04-09 16:40:26 -05:00
Evan Almloff
92f48169e9 WIP new api 2022-04-08 21:17:37 -05:00