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

Not working with Next 9 #4

Closed
fatlinesofcode opened this issue Oct 22, 2019 · 2 comments
Closed

Not working with Next 9 #4

fatlinesofcode opened this issue Oct 22, 2019 · 2 comments

Comments

@fatlinesofcode
Copy link

I've added this to my project which used Next v9 for server-side rendering.
I get this error :

LayoutEffect should only be used in components that render exclusively on the client. See https://fb.me/react-uselayouteffect-ssr for common fixes.
    in Unknown (at Header.js:7)
    in header (at Header.js:5)
    in Header (at page.js:15)
    in div (at PageContainer.js:12)
    in PageContainer (at page.js:14)
    in Context.Provider (at PageContext.js:28)
    in PageProvider (at page.js:10)
    in Page (at DefaultPage.js:22)
    in DefaultPage
    in withRouter(DefaultPage) (at pages/index.js:27)
    in Index
    in Query
    in Apollo(Index)
    in Context.Provider
    in Context.Consumer
    in ApolloProvider
    in withApollo(Apollo(Index))
    in App
    in Context.Provider
    in Context.Provider
    in Context.Provider
    in Context.Provider
    in AppContainer
    in AppTree
    in Context.Provider

and this one client side :

    at e (index.m.js:1)
    at commitHookEffectList (react-dom.development.js:19980)
    at commitPassiveHookEffects (react-dom.development.js:20015)
    at HTMLUnknownElement.callCallback (react-dom.development.js:347)
    at Object.invokeGuardedCallbackDev (react-dom.development.js:397)
    at invokeGuardedCallback (react-dom.development.js:454)
    at flushPassiveEffectsImpl (react-dom.development.js:22868)
    at unstable_runWithPriority (scheduler.development.js:643)
    at runWithPriority$2 (react-dom.development.js:11305)
    at flushPassiveEffects (react-dom.development.js:22841)
    at react-dom.development.js:22419
    at scheduler_flushTaskAtPriority_Normal (scheduler.development.js:436)
    at flushTask (scheduler.development.js:482)
    at flushWork (scheduler.development.js:607)
    at MessagePort.performWorkUntilDeadline (scheduler.development.js:231) ```

Is this compatible with Next.js?
@hadeeb hadeeb closed this as completed in 2ab27ed Oct 22, 2019
@hadeeb
Copy link
Owner

hadeeb commented Oct 22, 2019

Last release had a bug in cleanup function.
A fix is released as v0.0.4.

@fatlinesofcode
Copy link
Author

thanks @hadeeb that seems to work now.
I've used the Vue version too quite a bit.
Any plans to support hydrate on click and hover interactions? We drastically reduced out Time to Interact on our Nuxt site when we added those.

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