E
E
Evergarden772021-03-04 23:16:04
React
Evergarden77, 2021-03-04 23:16:04

Why is the component rendered by Route not passing history to props?

There is a route

<Route path='/success' render={() => <Success />}/>
, it renders the Success component and it seems like 60413ff6e7a37314511390.jpega history object should come to its props, but there is nothing but __proto__, why?
function Success(props) {


    console.log(props)
    useEffect((props) => {

    })


    return (
        <Result
            status="success"
            title="Successfully Purchased Cloud Server ECS!"
            subTitle="Order number: 2017182818828182881 Cloud server configuration takes 1-5 minutes, please wait."
        />
    )
}

export default Success;

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
abberati, 2021-03-05
@Evergarden77

Here is the component that was rendered by the route Here is the history in props The props you pass to the Success component are between and
() => <Success />
<Success/>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question