docs: examples of mistakes
docs: add hard_diff example missing parameter
This commit is contained in:
1 parent
fe1279a1c5
commit
2433b9d305
2 files changed
+2
-2
No files matched your search
@@ -33,7 +33,7 @@ impl<'a, const A: bool> FragmentBuilder<'a, A> {
|
|||||||
/// fn App(cx: Scope) -> Element {
|
/// fn App(cx: Scope) -> Element {
|
||||||
/// cx.render(rsx!{
|
/// cx.render(rsx!{
|
||||||
/// CustomCard {
|
/// CustomCard {
|
||||||
/// h1 {}2
|
/// h1 {}
|
||||||
/// p {}
|
/// p {}
|
||||||
/// }
|
/// }
|
||||||
/// })
|
/// })
|
||||||
|
|||||||
@@ -583,7 +583,7 @@ impl VirtualDom {
|
|||||||
///
|
///
|
||||||
/// *value.borrow_mut() = "goodbye";
|
/// *value.borrow_mut() = "goodbye";
|
||||||
///
|
///
|
||||||
/// let edits = dom.diff();
|
/// let edits = dom.hard_diff(ScopeId(0));
|
||||||
/// ```
|
/// ```
|
||||||
pub fn hard_diff(&mut self, scope_id: ScopeId) -> Mutations {
|
pub fn hard_diff(&mut self, scope_id: ScopeId) -> Mutations {
|
||||||
let mut diff_machine = DiffState::new(&self.scopes);
|
let mut diff_machine = DiffState::new(&self.scopes);
|
||||||
|
|||||||
Reference in new issue
Block a user