URL generation API, server-side rendering, and hydration problems

caprica Member Posts: 9
edited November 2023 in Developer APIs

I am using url-gen to generate image URLs in a Remix application, although I imagine this would be the same issue with any server-side rendering framework.

Basically, I get hydration errors when I generate URLs due to a mismatch in client vs server rendering.

For example, server renders something like this:


Client subsequently renders this:


You can see this "?_a" query parameter value is different each time, and so I am forced down an error path, or at least a sub-optimal path whereby Remix switches everything to client-side rendering.


Best Answer