0

what does history.push do in reactjs?

I'm trying to look for a definition but I'm not sure if I'm goolging hard enough..

   history.push(`/group/${searchResult.id}/overview`)

What does that do?

2

1 Answer 1

0

As mentioned in https://reacttraining.com/react-router/web/api/history it pushes a new entry onto the history stack

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks. so what happens then when a new entry is pushed into the history stack?
The user can use it to go back and forward in browser navigation

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.