Q:

How to switch page without click  in React?

In some case I need to switch page without click anything.
 makes me click some btn, url and so on.
Also I don't want to reload a page.
Is there any solution?

A:

I think you need React-Router.
You can switch page like this(if use React-Router):
this.props.history.push('/index');

You should use withRouter if your component don't hava history in props.
function Page(props) {
    function handleClick() {
        props.history.push('/index')
    }
    return (<p onClick={handleClick}>index page</p>)
}

export default withRouter(Page)

