Closed pdanpdan closed 2 weeks ago
This should be now ready. Please do not merge before we remove the second commit - it is just to have a playground while testing
I made some substantial changes, let me know what you think! See commit messages.
Fixed one little glitch, the rest is ok with me.
We need to decide what to keep in the examples - should I clean up examples to original and just replace ClientOnly
usage with clienOnly
?
Btw. I didn't test my changes, so maybe it doesn't work.
I think it's ready (including examples)
Very neat, clientOnly.ts
looks really nice :sparkles:
There are quite a lot of examples, which I actually like :+1:. It's a dedicated page so it makes sense. It's nice for users to have a playground with lots of exampels to play with and going deep, while vike.dev
can have easy docs while pointing to /examples/full/
.
One last thing: the utils/
directory is for small general purpose utilities like lodash. I think we should create a new directory for clientOnly.ts
. Ideas for how to name that directory? Maybe helpers/
? Maybe there is a terminology in Vue for these kind of helpers?
(I made some minor polishing. As always feel free to disagree and I'm happy if vike-vue eventually adopts a different style in the future.)
I cannot find another good category name for this kind of functions.
The closest I can think of is renderer
(it's a function that implements how something is rendered) / render
(if we don't want to clutter renderer
).
wrappers
might work, or as a catchall helpers
I cannot find another good category name for this kind of functions. The closest I can think of is
renderer
(it's a function that implements how something is rendered) /render
(if we don't want to clutterrenderer
).wrappers
might work, or as a catchallhelpers
I think render(er) is a little too vague and ambiguous with Vike's renderer/
directory.
I've a slight preference for helpers/
, but we can also go for wrappers/
if you prefer.
I'll move it to helpers
- I realized it's publicly from the root of the package so it does not matter to much
I cannot find a way to infer the attrs
type, so until someone else figures it out I would say this should be ready
:+1: The PR LGTM.
@4350pChris WDTY?
@pdanpdan Would you be so kind and fix the merge conflicts?
done
Improves DX