The react application jumps directly to the hyperlink when it starts.

due to requirements, you need to use react as a medium to open your own application hyperlinks.
I have tried the window.location method halfway, but there will be a scenario transition of the index.html page. I expect to jump to my hyperlink directly when react starts. Is there a good way to achieve it?
has also considered using react-router to load hyperlinks by default, but I don"t know if react is feasible before.


definitely needs a page to be the startup page. How to start the program without a page


is not that complicated. In the componentDidMount life cycle in index.js , just use window.location.href = 'xxx' directly.

index.js

class App extends React.Component {
    componentDidMount() {
        window.location.href = 'xxxx';
    }
    
    render() {
        return null;
    }
}

ReactDOM.render(App, document.body);
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-1bda0f4-2ff11.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-1bda0f4-2ff11.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?