Closed coderdiaz closed 2 years ago
This may not be related to react-payment-inputs
, but to React itself, actually they explain this in their documentation:
If you use server rendering, keep in mind that neither useLayoutEffect nor useEffect can run until the JavaScript is downloaded. This is why React warns when a server-rendered component contains useLayoutEffect.
https://reactjs.org/docs/hooks-reference.html#uselayouteffect
I'm using this package with Next.js and works awesome but this shows an warning in
dev
mode becauseuseLayoutEffect
is used only for client-side applications for SSR application is better useuseEffect
according to documentation.Any suggestion for solve this warning?