i want to pass link in button at the time call the api from the button.i can acheive any one of this.how can i call both
Loading
i want to pass link in button at the time call the api from the button.i can acheive any one of this.how can i call both
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Ganesan CPosted Aug 25, 2021, 6:05 PM
I think it is not possible to combine button clikck and link event in single click. One thing we can do.In the 'handleSubmit' function, once api call or your logic is done manually route to 'SharePost' component.
You can find others ways in the below link.
https://www.telerik.com/blogs/programmatically-navigate-with-react-router