Coder Social home page Coder Social logo

Comments (5)

ivansevillaa avatar ivansevillaa commented on July 17, 2024

Hello @bonesoul sorry for being late. Did you solve it?
If you want, you can create a PR fixing that would be awesome and so helpful to me.
Other Way if you can't, just tell me and I'll work on it to solve it.

from use-next-blurhash.

krstivojevicv avatar krstivojevicv commented on July 17, 2024

I`m having the same issue. The cause of the problem seems to be the mismatch in image data url created on server and on client.

from use-next-blurhash.

ivansevillaa avatar ivansevillaa commented on July 17, 2024

Hi @krstivojevicv! I couldn't understand, could you give me an example?
And why do you create the dataUrl on the server?

But I'm not sure if I understood why the bug happens.

from use-next-blurhash.

krstivojevicv avatar krstivojevicv commented on July 17, 2024

Hello @ivansevillaa

Thx for the lib by the way :)

Its easy to reproduce, just run the NextJS app in SSR mode. Im not creating dataUrl on the server, nextjs is. It prerenders the html page on server and then hydrates it on client (https://reactjs.org/docs/react-dom.html#hydrate). My guess is that issue is a result of image generated on server side (by canvas lib - https://www.npmjs.com/package/canvas) differs from image generated on client side during hydration.

I might be wrong, but this is the only explanation I could come up with

from use-next-blurhash.

ivansevillaa avatar ivansevillaa commented on July 17, 2024

Fixed on #6.

If the error is still reproducing, reopen the issue please

from use-next-blurhash.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.