Skip to content

Use a semantic tag instead of a div in an example for 5. What is the difference between Element and Component? #343

Open
@dolgachio

Description

@dolgachio

Desccription

If you open 5. What is the difference between Element and Component?
the example code is:

const Button = ({ handleLogin }) => (
  <div id={"login-btn"} onClick={handleLogin}>
    Login
  </div>
);

However, the div element is not the best choice for a button. So, I would suggest replacing it with a button element.

I would be glad to create a pull request if you don't mind 😃 @sudheerj

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions