[Feature?]: Improve ergonomics of clientOnly
function with a helper.
#1619
Labels
enhancement
New feature or request
clientOnly
function with a helper.
#1619
Duplicates
Latest version
Summary 💡
According to solid-docs-next/issues/840,
clientOnly
requires at least 2 files wit the use ofimport()
However, this is quite inconvenient for experimenting with CSR vs SSR.
So I'd like to propose a wrapper which is much simpler to use.
Examples 🌈
The
useClient
wrapper could be implemented in this way:Usage:
Motivation 🔦
This feature allows quick switching between client side rendering or server side rendering without the overhead of adding additional files and import.
The text was updated successfully, but these errors were encountered: