单击<a>

时间:2017-01-11 15:51:13

标签: javascript reactjs

This code doesn't work.

<a href="/any/url" target="_blank" onClick={ e => e.preventDefault() }>

If I click on the link, an event triggers anyways. And I have no idea why.

I've looked through dozen of the similar questions but couldn't find the answer.

Here is official documentation时,事件会阻止ReactJS中的默认值。但它也不会这样。

0 个答案:

没有答案