Werdox
Explore posts from serversdeno and @types/react
In the docs it states that in order to use node packages that don't ship with type but have a
@types/...
declaration, I have to use the
// @deno-types="@types/..."
directive.
this is fine except when react
doesn't ship with types and I have to now include this directive in many many files and it also does not auto complete the import so I manually have to type the import in new files.
I guess I could use esm.sh
for this case but I don't know if it's a good idea to have npm:package
, https://esm.sh/...
, jsr:package
mixed in the deno.json imports.
TLDR:
- react does not have types so @deno-types="..."
is tedious in every file
- Should I use esm.sh
for this package instead or it's a bad idea?1 replies
PPrisma
•Created by Werdox on 6/19/2024 in #help-and-questions
omit with condition
I want to only omit certain fields if a condition in the same thing I'm querying is true
example:
11 replies
Nuxt Image with ssr false
Im creating a portfolio website and it has a lot of small images inside. Im using NuxtImg component to set a size and quality for each image.
Now local works perfectly fine but when I generate a static version, it uses does not optimize my images and just uses the original ones.
I do have
ssr: false
in my config and image optimization does work when it's enabled.4 replies
page layout remounts when changing to a route using the same layout
I know this may be the intended behaviour but I'm creating a chat app and the layout has a list of user channels and it's not practical to fetch the whole list on every route change
2 replies
Layout transition with javascript hook not working
I wanted to animate between layouts using anime.js. But it seems that the layout transition javascript hook doesn't even care about when the
done()
function is called and just immediately changes the layout.
here is my code:
here I'm just creating a promise that when done, with call the done
function. i tried to await it; tried using just setTimeout; nothing worked!1 replies