Skip to content

Conversation

@emateu
Copy link
Contributor

@emateu emateu commented Sep 3, 2021

Background

Hi everyone! first of all, thanks so much for this great tool ;). I was using it on a small personal project which uses Next.js.

I found some issues related with the Server Side Rendering, so I copied the lib directly on my project and did some minr changes to make it work with Next.js + SSR.

Sharing the updates with you guys, feel free to use this PR as inspiration if you have better ideas.

Changes done

  • Check if there is (not) browser on several places to prevent errors.
  • Had to remove LocalStorageChanged class because CustomEvent is not a thing on server side.
  • Added some missing deps to the src/use-localstorage.ts useEffect.

@emateu
Copy link
Contributor Author

emateu commented Sep 16, 2021

@iamsolankiamit @jharrilim 👀

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

Successfully merging this pull request may close these issues.

2 participants