0

I have an a element which has his own href and it works perfectly. The problem is that besides an href element i want to make an onClick function, but when i do so, the href is ignored:

<li><a href="#someSectionOfThePage" onClick={someFunction}>GO TO SECTION</a></li>

Using this syntax, the someFunction runs, but i'm not being redirected to #someSectionOfThePage.

Emile Bergeron
  • 17,074
  • 5
  • 83
  • 129
  • 1
    What does `someFunction` do? Can you add the code? – Chris May 27 '19 at 17:34