Fix nested rsx expansion by not using template titles (#2799)
* Fix nested rsx expansion by not using template titles * fix writers with nameless templates * fix clippy * dont commit vscode fix * fix release mode, pull out __template_name * fix axum_desktop * Fix core tests * Make most fields of HotReloadedTemplate public for testing * wip: formatting, compare all diff cases * slightly smarter diffing for dynamic nodes * add a comment about generic node diffing * clean up mutations a bit * fix load template * simplify maybe_rebuild * Restore write mutations flag in web * write_mutations -> skip_mutations --------- Co-authored-by: Evan Almloff <evanalmloff@gmail.com>
This commit is contained in:
1 parent
a2180b92e9
commit
0de3bf7aeb
40 files changed
+597
-1038
No files matched your search
@@ -20,7 +20,7 @@ pub struct Renderer {
|
||||
render_components: Option<ComponentRenderCallback>,
|
||||
|
||||
/// A cache of templates that have been rendered
|
||||
template_cache: FxHashMap<usize, Arc<StringCache>>,
|
||||
template_cache: FxHashMap<Template, Arc<StringCache>>,
|
||||
|
||||
/// The current dynamic node id for hydration
|
||||
dynamic_node_id: usize,
|
||||
@@ -108,7 +108,7 @@ impl Renderer {
|
||||
) -> std::fmt::Result {
|
||||
let entry = self
|
||||
.template_cache
|
||||
.entry(template.template.id())
|
||||
.entry(template.template)
|
||||
.or_insert_with(move || Arc::new(StringCache::from_template(template).unwrap()))
|
||||
.clone();
|
||||
|
||||
|
||||
Reference in new issue
Block a user