How to make a link clickable in React.Js inside render? How to make a link clickable in React.Js inside render? reactjs reactjs

How to make a link clickable in React.Js inside render?


The React way to add a click and redirect is to use the Link to provided by the react-router-

Inside the component

import {Link} from 'react-router-dom;class Parent extends React.Component{    render(){         <div><Link to="/home">Click here to go back to home page</Link></div>    } }

In route file

import React from 'react';import {BrowserRouter as Router,Switch} from 'react-router-dom;export class RoutingClass extends React.Component{    render(){        <Router>            <Switch>                <Route exact path="/home" component={Home} />            </Switch>        </Router>    }}


I hope that I understood your question, I think what you are looking for is

  <tr>     <td>IPFS Hash # stored on Eth Contract</td>     <td><a href={"https://gateway.ipfs.io/ipfs/"+this.state.ipfsHash}>Click here to go to home page</a></td>  </tr>