Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

178
Views
how to direct to mobile page directly ,not flash PC page first
//route.js   
export default props => (
    <Router>
        <Switch>
          <Route  path='/page/index' component={ Frame } />        //for PC
          <Route  path='/mobile/index' component={ Mobile } />     //for mobile 
        </Switch>
    </Router>
  )


// js for PC page  Route: /page/index 
 
export default function Frame(props) {
      const classes = useStyles();


      useEffect(() =>{
        if(mobileDevice())
          window.location.href='/mobile/index';
      },[]);
        .....

this results in PC page will show to user first,and disappeared in a flash , I don't want the flashing page,it is not good for user experience . how to change the code ....

I have tried using useLayoutEffect, it also doesn't work .

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!