The fetch return string in react contains a label on how to add react routing.

fetch(url)
        .then(res => res.text())
        .then(result => {
            this.setState({
                detail: result
            });
        });

render () {

    return (
        <div
            dangerouslySetInnerHTML={{ __html:this.state.detail }}
        />
    );
}

tag

the result is how can some a tags be changed to route jump
< Link to= {} > < / Link >


extract the links from the returned an and put them into an object
traverse the object to generate link

var data = process(this.state.detail) // {href: 'www.baid.com'}

<div>
<Link to={data.href} />
</div>
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b31317-2bd70.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b31317-2bd70.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?