Commit graph

253 commits

Author SHA1 Message Date
Evan Almloff
9baef6bcd9 always load the templates in hydration 2023-01-31 14:18:34 -06:00
Evan Almloff
696109db10 implement hydration 2023-01-31 14:10:48 -06:00
Jonathan Kelley
c4a18bc24d chore: clean up some clippy warnings and add clippy lints to CI 2023-01-11 16:13:41 -08:00
Evan Almloff
8a1f54f573 fix drag* events 2023-01-10 12:53:40 -06:00
Evan Almloff
51dba50c04 use BumpBox<Any> and FromAnyValue instead of sync bounds 2023-01-02 14:40:25 -06:00
Evan Almloff
044462876d Merge branch 'upstream' into fix-non-str-attributes 2022-12-28 20:36:57 -06:00
Jonathan Kelley
366e46eddf chore: add some fixes to hot reload 2022-12-25 23:22:43 -05:00
Evan Almloff
4caf95d639 add bubbling data to event listeners in the web renderer 2022-12-23 16:04:10 -06:00
Evan Almloff
afd024bcb6 Merge branch 'upstream' into fix-non-str-attributes 2022-12-23 15:53:39 -06:00
Evan Almloff
db7a1ec0b0 fix lints 2022-12-21 13:04:57 -06:00
Evan Almloff
e5a5850354 merge master 2022-12-20 20:48:28 -06:00
Evan Almloff
493ee1cb3f Merge branch 'upstream' into fix-hot-reloading 2022-12-19 21:17:22 -06:00
Jonathan Kelley
8d7d07db56 chore: make clippy happy in workspace crate 2022-12-19 11:56:44 -08:00
Evan Almloff
96ce704f8e fix serialization 2022-12-19 11:48:28 -06:00
Jonathan Kelley
c409fecaaf fix: sync with master 2022-12-17 01:52:17 -08:00
Jonathan Kelley
cc7736302a Merge branch 'master' into fix-non-str-attributes 2022-12-17 01:51:13 -08:00
Jon Kelley
5ac9b595ea
Revert "fix: liveview interpreter using new templates" 2022-12-16 14:20:05 -08:00
=
14dd568987 Merge branch 'upstream-master' into fix-hot-reloading 2022-12-16 10:07:11 -06:00
Jonathan Kelley
a81bbb83d6 fix: removed files 2022-12-15 20:24:30 -08:00
=
0d9c350d5e implement for web and desktop 2022-12-15 21:16:37 -06:00
Jonathan Kelley
d4b6bb8a7b feat: fix the scope rollover bug 2022-12-12 18:31:30 -08:00
Evan Almloff
0c0158f62d Merge branch 'upstream' into fix-non-str-attributes 2022-12-09 16:24:02 -06:00
Evan Almloff
8a1c96a68c fix custom attribute value support 2022-12-09 16:18:37 -06:00
Jon Kelley
051f85f78f
Merge branch 'master' into return-from-js 2022-12-09 13:19:05 -08:00
Evan Almloff
bf47f64852 Merge branch 'upstream' into return-from-js 2022-12-08 11:25:15 -06:00
Evan Almloff
35bebbf0cb wrap the web eval result in a compatability layer 2022-12-08 10:57:09 -06:00
Evan Almloff
e863ef29b8 allow returning values from use_eval 2022-12-08 10:44:56 -06:00
Evan Almloff
99a4a9d45b Merge branch 'upstream' into optimize-templates-v3 2022-12-07 18:29:02 -06:00
Evan Almloff
56b027ef33 fix more lints 2022-12-07 17:24:50 -06:00
Evan Almloff
b79ad4f50e Merge remote-tracking branch 'upstream/master' into optimize-templates-v3 2022-12-07 17:20:31 -06:00
Jonathan Kelley
4eefc3f854 chore: rename all &cx to cx, make clipppy happy 2022-12-07 13:11:40 -08:00
Evan Almloff
d64d92e4b4 disable rif raf 2022-12-07 07:24:51 -06:00
Jonathan Kelley
1b14b309e9 chore: clean up desktop 2022-12-06 16:37:28 -08:00
Evan Almloff
6102902387 work on optimizing web implementation 2022-12-06 14:24:35 -06:00
Jonathan Kelley
b182a6ee75 chore: clean up interpreter and bindings 2022-12-05 16:47:04 -08:00
Jonathan Kelley
7b1cdb7d85 feat: get desktop working with new template strategy 2022-12-05 16:08:41 -08:00
Jonathan Kelley
a61daf220d feat: context api overhaul 2022-12-02 16:24:49 -08:00
Jonathan Kelley
11a45c8ef0 chore: continue to clean things up 2022-12-01 01:08:49 -05:00
Jonathan Kelley
85657d3906 feat: rip out mutations for templates 2022-12-01 00:46:15 -05:00
Jonathan Kelley
3b166c9edd wip: clean up some things 2022-11-30 23:54:30 -05:00
Jonathan Kelley
ba26b1001a chore: clean up web impl 2022-11-30 17:44:00 -05:00
Jonathan Kelley
18d6b1ad6f feat: get web working properly 2022-11-30 17:21:10 -05:00
Demonthos
f21c8423eb
optimizations for wasm size (#582)
* optimize for size

* fix tests

* revert log feature

* make backtrace not optional

* remove dev feature from web dev-deps
2022-11-16 22:22:13 -08:00
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
Jon Kelley
540e785d8b
Less clumsy configuration for desktop and mobile (#553)
* chore: dont use prebuilt builder pattern for configuring desktop

* chore: use regular config pattern for web

* Chore: update docs too

* chore: clean up some warnings
2022-09-13 16:22:27 -07:00
Reinis Mazeiks
d734dc5b46
Remove argument from use_hook closure (#496)
Also; update docs for said function
2022-07-11 15:50:56 -04:00