useSSE icon indicating copy to clipboard operation
useSSE copied to clipboard

Issue with component rendering

Open tomexx opened this issue 4 years ago • 3 comments

Hi, first of all, thank you for the repo!

Secondly, I tried to use the repo with Razzle SSR. The server part works correctly but I have issue on frontend part. The components with useSSE seems to render correctly, but they rerender again while FE init so there is visible blinking (the API call from useSSE is fired again on FE, trying to reach the same data that are already rendered by server). Are you aware of this, is it a known issue?

Thanks a lot

tomexx avatar Jan 25 '21 22:01 tomexx

Hi, I never worked with Razzle. Are you able to provide an example code?

kmoskwiak avatar Mar 04 '21 19:03 kmoskwiak

Hi,

I am using the custom server side rendering with webpack and I can confirm that I have the same issue.

The api request is triggered again on the client side despite the data is rendered and delivered from.

osvarychevskyi avatar Jun 23 '21 09:06 osvarychevskyi

Did you declare const { ServerDataContext, resolveData } = createServerContext() inside your express middleware/controller?

JulianSoto avatar Jul 24 '21 14:07 JulianSoto