Is using button's onClick callback to navigate is a semantically correct?

Like in the title.
Is calling
<button onClick={() => nav("/subpage")}>Btn</button>
Was this page helpful?