beekai-oss / little-state-machine

📠 React custom hook for persist state management
https://lrz5wloklm.csb.app/
MIT License
1.47k stars 53 forks source link

Error when using with next.js #138

Closed skopz356 closed 2 years ago

skopz356 commented 2 years ago

First of all thank you for creating this library. I tried to use this library with next.js a when I enter some data into the state and reload the page. I get error saying Error: Text content does not match server-rendered HTML.. I know that I can make the component only client side, but I do not want to. Is there any other option?

Reproduction:

  1. Visit https://codesandbox.io/s/nextjs-react-hook-form-wizard-form-forked-otzv44?file=/pages/index.js
  2. Enter some data into 'First Name', then reload by reload icon in sandbox.
bluebill1049 commented 2 years ago

thanks for the issue report currently this library is limited to clients only and kept simple and small (<1kb).