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() { 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.