selvi jp

selvi jp

  • 1.8k
  • 291
  • 15.9k

click button for another page in react js

Aug 23 2021 11:03 AM

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

<form method="post" onSubmit={this.handleSubmit.bind(this)} >

<input type="hidden" name="id" defaultValue={item.id}/>

<Link to={"/SharePost/"+item.upload_id} className="anchor" > */}

<button style={{background:'transparent',border:'none'}} > <span style={{color:'white'}}> <b>{item.profile_name} </b> thinks <b> {item.upload_title} post </b> is cool </span> </button>

</Link> </form>

 


Answers (1)