File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -584,7 +584,7 @@ A continuación, creemos un componente <i>Button</i> para los botones de nuestra
584584` ` ` js
585585const Button = (props ) => {
586586 return (
587- < button onClick= {props .handleClick }>
587+ < button onClick= {props .onClick }>
588588 {props .text }
589589 < / button>
590590 )
@@ -719,7 +719,7 @@ También podemos simplificar el componente Button.
719719` ` ` js
720720const Button = (props ) => {
721721 return (
722- < button onClick= {props .handleClick }>
722+ < button onClick= {props .onClick }>
723723 {props .text }
724724 < / button>
725725 )
@@ -734,8 +734,8 @@ Podemos usar la desestructuración para obtener solo los campos requeridos de <i
734734Por ejemplo, la prop ` onClick` del componente Button debería ser llamada ` onSmash` :
735735
736736` ` ` js
737- const Button = ({ handleClick , text }) => (
738- < button onClick= {handleClick }>
737+ const Button = ({ onClick , text }) => (
738+ < button onClick= {onClick }>
739739 {text}
740740 < / button>
741741)
You can’t perform that action at this time.
0 commit comments