SSR example always fetch client side #10
-
Hey. On nextjs example I noticed the ssr has this: It always fetch and import the component client side, but it's supposed to fetch and render server side. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi @lu-zen ! You can find a detailed explanation about how this example works here. Hope this makes sense! |
Beta Was this translation helpful? Give feedback.
Hi @lu-zen !
You can find a detailed explanation about how this example works here.
Basically this
TinyFrontendServerStorage.Component
get set by the server when it's loading so it's only defined server side. This means that server sideExampleTinyFrontendClient
don't get called (and therefore loaded), and client side asTinyFrontendServerStorage.Component
is not defined,ExampleTinyFrontendClient
gets used instead :).Hope this makes sense!