question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add next js demo. Was: Warning when using Hookstate with Next.JS

See original GitHub issue

Hello,

I am receiving a warning when I use Hookstate with NextJS.

Warning: useLayoutEffect does nothing on the server, because its effect cannot be encoded into the server renderer's output format. This will lead to a mismatch between the initial, non-hydrated UI and the intended UI. To avoid this, useLayoutEffect should only be used in components that render exclusively on the client. See https://reactjs.org/link/uselayouteffect-ssr for common fixes.

I am not able to find any instruction on how to use Hookstate with Next.

Any help is greatly appreciated.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:39 (39 by maintainers)

github_iconTop GitHub Comments

1reaction
avkonstcommented, Sep 30, 2021

released in 3.0.13

0reactions
afkcodescommented, Sep 30, 2021

Hey @avkonst just updated the library in my local but it seems the generated index.js & index.es.js contains the older code. Please tell me if i have done something wrong

Read more comments on GitHub >

github_iconTop Results From Across the Web

react-hydration-error - Next.js
In general this issue is caused by using a specific library or application code that is ... An example of this is using...
Read more >
UseMemo warning in with-apollo example #8810 - GitHub
I'm integrating the new example code into my app. I immediately got an eslint warning for this line: React Hook useMemo has missing ......
Read more >
Simplify React state management with Hookstate
In this article, we'll introduce Hookstate as a simple and efficient state management solution for React applications by building a demo ...
Read more >
Can I use React Hooks with Next.js? - Algolia support
Yes. Here is documentation on this, and here is an example repository you can use to get started.
Read more >
Anyone has worked with hookstate with next js? - Reddit
New to Next Js (SSR) Tried to implement hookstate with next js but failed. is there anyone using it and can help inhow...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found