Fix hot reloading components with keys (#2886)

* Fix hot reloading components with keys

* include component formatted segment keys, but not dynamic component value

* Fix component_literal_dyn_idx index

* add a new test for hot reloading components with keys

* Even more tests

* make clippy happy

* fix typo
This commit is contained in:
Evan Almloff authored and GitHub committed 2024-08-28 18:53:11 -05:00
1 parent 0e937daaa1
commit 4676171861
7 files changed
+176 -56

No files matched your search

+4
View File
@@ -406,6 +406,10 @@ impl AttributeName {
matches!(self, Self::BuiltIn(ident) if ident.to_string().starts_with("on"))
}
pub fn is_likely_key(&self) -> bool {
matches!(self, Self::BuiltIn(ident) if ident == "key")
}
pub fn span(&self) -> proc_macro2::Span {
match self {
Self::Custom(lit) => lit.span(),