React onClick and preventDefault() link refresh/redirect?

前端 未结 13 769
生来不讨喜
生来不讨喜 2020-11-30 06:04

I\'m rendering a link with react:

render: ->
  `upvote`

Then, above I hav

相关标签:
13条回答
  • 2020-11-30 07:07

    none of these methods worked for me, so I just solved this with CSS:

    .upvotes:before {
       content:"";
       float: left;
       width: 100%;
       height: 100%;
       position: absolute;
       left: 0;
       top: 0;
    }
    
    0 讨论(0)
提交回复
热议问题