I am using react property instead of tag. So what i need to do is to call a function on click of link.What approach should i need to follow to achieve this.can i use the below function.
<Link to={`/testimonial/${post.id}`} className="red">
<span onClick={this.saveData(post.title)}>More</span>
</Link>
I have to trigger the function, that will save data to localStorage and then redirect user to the component.
Thanks.