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

isValidElementType is not a function #26

Closed
haf opened this issue Jul 30, 2019 · 1 comment
Closed

isValidElementType is not a function #26

haf opened this issue Jul 30, 2019 · 1 comment

Comments

@haf
Copy link

haf commented Jul 30, 2019

Screenshot 2019-07-30 at 21 43 12

Connected to routing, but probably not in this library, because it may be a nextjs difference of package versions/mixup that causes this. developit/preact-redux#43 Feel free to close.

@danielr18
Copy link
Owner

You are probably right, I only use Next.js router functions in the beforePopState callback.

Router.beforePopState(function(state): boolean {
    const { url, as, options } = state
    change('replaceState', url, as, options, 'POP')
    if (unpatchedMethods.bpsCallback) {
      unpatchedMethods.bpsCallback(state)
    }
    return false
  })

  Router.beforePopState = function(cb: BeforePopStateCallback) {
    unpatchedMethods.bpsCallback = cb
  }

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