Skip to content

Conversation

@smith558
Copy link
Contributor

No description provided.

@mluukkai mluukkai merged commit d0a9b4e into fullstack-hy2020:source Nov 25, 2023
@smith558
Copy link
Contributor Author

Can I get an input here? @mluukkai Which one of these is actually the preferred "standard" in React?

const Button = ({ handleClick, text }) => (
  <button onClick={handleClick}>
    {text}
  </button>
)

<Button handleClick={handleButtonClick} text="Click me" />

or

const Button = ({ onClick, text }) => (
  <button onClick={onClick}>
    {text}
  </button>
)

<Button onClick={handleButtonClick} text="Click me" />

?

I've realised I just seen multiple conflicting resources? Also, the rest of he page https://fullstackopen.com/en/part1/a_more_complex_state_debugging_react_apps/ needs to be updated to be made consistent, but before that, I want to confirm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants