useSSE
useSSE copied to clipboard
Issue with component rendering
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
Hi, I never worked with Razzle. Are you able to provide an example code?
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.
Did you declare const { ServerDataContext, resolveData } = createServerContext()
inside your express middleware/controller?