From 82916d22b990c59d3f8799c02b0b54b24aa86e78 Mon Sep 17 00:00:00 2001 From: Roopkumar Das <120183778+RoopkumarD@users.noreply.github.com> Date: Sat, 16 Sep 2023 18:41:32 +0530 Subject: [PATCH 1/2] fixed naming correction buttonWithSuperPower -> buttonWithStyle --- .../16_higher_order_component.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/16_Higher_Order_Component/16_higher_order_component.md b/16_Higher_Order_Component/16_higher_order_component.md index af6ff89..b6ffedd 100644 --- a/16_Higher_Order_Component/16_higher_order_component.md +++ b/16_Higher_Order_Component/16_higher_order_component.md @@ -69,7 +69,7 @@ const buttonWithStyle = (CompParam) => { return } } -const NewButton = buttonWithSuperPower(Button) +const NewButton = buttonWithStyle(Button) class App extends Component { render() { @@ -149,12 +149,12 @@ const buttonWithStyles = (CompParam, name = 'default') => { } } -const NewButton = buttonWithSuperPower(Button) -const ReactButton = buttonWithSuperPower(Button, 'react') -const InfoButton = buttonWithSuperPower(Button, 'info') -const SuccessButton = buttonWithSuperPower(Button, 'success') -const WarningButton = buttonWithSuperPower(Button, 'warning') -const DangerButton = buttonWithSuperPower(Button, 'danger') +const NewButton = buttonWithStyles(Button) +const ReactButton = buttonWithStyles(Button, 'react') +const InfoButton = buttonWithStyles(Button, 'info') +const SuccessButton = buttonWithStyles(Button, 'success') +const WarningButton = buttonWithStyles(Button, 'warning') +const DangerButton = buttonWithStyles(Button, 'danger') class App extends Component { render() { From 568beed09fd50e34da2a7257a139900ab33a57d9 Mon Sep 17 00:00:00 2001 From: Roopkumar Das <120183778+RoopkumarD@users.noreply.github.com> Date: Sat, 16 Sep 2023 18:51:34 +0530 Subject: [PATCH 2/2] fixed a very little english mistake --- 26_Context/26_context.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/26_Context/26_context.md b/26_Context/26_context.md index 04bf9ca..c6ddaec 100644 --- a/26_Context/26_context.md +++ b/26_Context/26_context.md @@ -20,7 +20,7 @@ # Context -Context allow as to pass data through the component tree without having to pass props down manually to every child component at every level. +Context allow us to pass data through the component tree without having to pass props down manually to every child component at every level. In React, data is passed top-down (parent to child) via props, but this can be cumbersome for certain types of props (e.g. locale preference, UI theme) that are required by many components within an application. Context provides a way to share values like these between components without having to explicitly pass a prop through every level of the tree.