The purpose of a separate layout would be to keep the routing logic separate from the ui logic. But you are correct about the re-rendering of the components.
I have used useHistory for only navigation, so I don't have enough knowledge to comment on how it compares to withRouter
Thanks for your input :)
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
The purpose of a separate layout would be to keep the routing logic separate from the ui logic. But you are correct about the re-rendering of the components.
I have used useHistory for only navigation, so I don't have enough knowledge to comment on how it compares to withRouter
Thanks for your input :)