From 395b676a3b7a3a6bc0f5d8b8b569086d752defd9 Mon Sep 17 00:00:00 2001 From: Mayada <115709272+Maddily@users.noreply.github.com> Date: Wed, 27 Nov 2024 12:17:22 +0200 Subject: [PATCH 1/2] Improve grammar and punctuation --- .../passing_data_between_components.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/react/getting_started_with_react/passing_data_between_components.md b/react/getting_started_with_react/passing_data_between_components.md index b36f5b0fbb..d539e40c6a 100644 --- a/react/getting_started_with_react/passing_data_between_components.md +++ b/react/getting_started_with_react/passing_data_between_components.md @@ -15,7 +15,7 @@ In React, data is transferred from parent components to child components via pro ### Using props in React -Now that we know *how* data transfers between components, let's explore *why* this might be a useful feature in React. Consider the following `Button` component, which then gets rendered multiple times within our `App` component. +Now that we know *how* data transfers between components, let's explore *why* this might be a useful feature in React. Consider the following `Button` component, which gets rendered multiple times within our `App` component. ```jsx function Button() { @@ -63,7 +63,7 @@ export default function App() { } ``` -This may not seem like a huge deal right now, but what if we had 10 buttons, each one having different text, fonts, colors, sizes, and any other variation you can think of. Creating a new component for each of these button variations would very quickly lead to a LOT of code duplication. +This may not seem like a huge deal right now, but what if we had 10 buttons, each one having different text, fonts, colors, sizes, and any other variation you can think of? Creating a new component for each of these button variations would very quickly lead to a LOT of code duplication. Let's see how by using props, we can account for any number of variations with a *single* button component. @@ -255,7 +255,7 @@ There are also other ways to implement this behavior. Hint: [curried functions!] -Hopefully you can now understand from the examples in this lesson, just how incredibly useful props are for writing reusable and customizable React components. However, we are still only scratching the surface of what React can offer us. Continue on to the next section to learn even more! +Hopefully, you can now understand from the examples in this lesson just how incredibly useful props are for writing reusable and customizable React components. However, we are still only scratching the surface of what React can offer us. Continue on to the next section to learn even more! ### Assignment From c4122414aac61fc9ba3d16eadbe23e671c3489bf Mon Sep 17 00:00:00 2001 From: Mayada <115709272+Maddily@users.noreply.github.com> Date: Sat, 7 Dec 2024 14:27:16 +0200 Subject: [PATCH 2/2] Update grammar --- .../passing_data_between_components.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/react/getting_started_with_react/passing_data_between_components.md b/react/getting_started_with_react/passing_data_between_components.md index d539e40c6a..f7233cf434 100644 --- a/react/getting_started_with_react/passing_data_between_components.md +++ b/react/getting_started_with_react/passing_data_between_components.md @@ -63,7 +63,7 @@ export default function App() { } ``` -This may not seem like a huge deal right now, but what if we had 10 buttons, each one having different text, fonts, colors, sizes, and any other variation you can think of? Creating a new component for each of these button variations would very quickly lead to a LOT of code duplication. +This may not seem like a huge deal right now, but what if we had 10 buttons? Each one having different text, fonts, colors, sizes, and any other variation you can think of. Creating a new component for each of these button variations would very quickly lead to a LOT of code duplication. Let's see how by using props, we can account for any number of variations with a *single* button component.