From 34fe98f2f201b24b02aaed6496390ca8f855fac9 Mon Sep 17 00:00:00 2001 From: mergerg <64447714+raphaelsiz@users.noreply.github.com> Date: Tue, 21 Mar 2023 22:21:00 -0700 Subject: [PATCH] Switch "with" and "without destructuring" The example for "without destructuring" was the destructured way it's done in the tutorial, the example for "with destructuring" was the old way to pass in a props object without destructuring --- .../dev/tutorials/pattern-design/draft-method/en.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/markdown/dev/tutorials/pattern-design/draft-method/en.md b/markdown/dev/tutorials/pattern-design/draft-method/en.md index 28226bdf146..7cd8371d0a6 100644 --- a/markdown/dev/tutorials/pattern-design/draft-method/en.md +++ b/markdown/dev/tutorials/pattern-design/draft-method/en.md @@ -31,18 +31,18 @@ equivalent: ```design/src/bib.mjs -function draftBib({ part }) { +function draftBib(props) { + + return props.part - return part } ``` ```design/src/bib.mjs -function draftBib(props) { - - return props.part +function draftBib({ part }) { + return part } ```