Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Client-side route matching is not equivalent to server-side one #330

Open
brunoabreu opened this issue Jun 26, 2019 · 1 comment
Open

Client-side route matching is not equivalent to server-side one #330

brunoabreu opened this issue Jun 26, 2019 · 1 comment

Comments

@brunoabreu
Copy link
Contributor

We should use the same algorithm in order to avoid inconsistencies between server-side and client-side navigation.

This PR (#328) will fix some issues, but it's not perfect as @athoscouto noticed: #328 (review)

@sperks-syatt
Copy link

I'm suspecting that the issue here is that mobile content is being delivered at 1025px (64.1rem = 1025.6px). Could we not just change the logic to determine isScreenMobile = useMediaLayout({ maxWidth: '64rem' }) and set isMobile: isScreenMobile

  const isScreenMedium = useMediaLayout({ minWidth: '40rem' })
  const isScreenMobile = useMediaLayout({ maxWidth: '64rem' })

  const clientDevice = {
    type: isScreenLarge ? Device.desktop : 
            isScreenMedium ? Device.tablet : Device.phone,
    isMobile: isScreenMobile,
  }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants