Closed irfanDC closed 4 years ago
yes! got same problem here on mobile it doesn't work at all but perfectly work on desktop version
You have to use <BrowserRouter>
, this does not work with <HashRouter>
.
I'm unable to reproduce an issue on mobile.. does the example site http://react-router-hash-link.rafrex.com/ work for you on mobile.. if not which device and browser? Thanks.
Facing the same issue on iOS and even desktop Safari.
EDIT: I think if http://react-router-hash-link.rafrex.com/ had two pages (foo and bar) each with 3 sections pointing from one to the other, you would see the issue.
The demo site has the home page which links to the page with 3 sections. The scroll works fine for me, but note that when navigating to a new page it won't smooth scroll. If this is still an issue, please open a new issue and with a failing example, thanks.
I am facing the same issue, this is not working in mobile nor in responsive mode. Also, I am using BrowseRouter
.
All is working on the website but on the mobile navigation not working, here is the code
import React, { Component } from "react"
import { NavHashLink as NavLink } from 'react-router-hash-link';
// and the link creation script
<NavLink to={"#schedule"}
Note: I am also using HashRouter as without it mobile app showing blank page.