Relative Content

Tag Archive for reactjsreact-hooksreact-router

React router dom v6 forward/backward navigation

In my react functional component, I have used navigate() [react-router-dom v6] to go forward and backward in the application. I need to detect whether forward/backward is available or not so that i can disable/enable icons. how to find it using react-router-dom methods? or any other javascript methods to detect like using window.history ?