Is there any way to render a component on the client side only in Solid Start.
Just like in next js we can use dynamic to get ssr false. Is there any alternative for that in SolidJS?
I tried to import module in createEffect.
Is there any way to render a component on the client side only in Solid Start.
Just like in next js we can use dynamic to get ssr false. Is there any alternative for that in SolidJS?
I tried to import module in createEffect.
There is an experimental API unstable_clientOnly exported from solid-start:
On the server it will render
nullor will render thefallbackif you pass it any. This can help avoid layout shifts.
https://github.com/solidjs/solid-start/issues/320
It uses isServer from solid-js/web internally:
This indicates that the code is being run as the server or browser bundle. As the underlying runtimes export this as a constant boolean it allows bundlers to eliminate the code and their used imports from the respective bundles.