tsParticles & Deno
Hi,
I’m working on a personal project with Deno & Lume.
I’m trying to use tsParticles with preact.
It seems to be some misconfiguration, but I don’t understand what I’m missing.
Here is a PR of my code with a comment with captures :
https://github.com/severindupouy/severin-dupouy.deno.dev/pull/1#pullrequestreview-1559886275
I’ve tried to make it work with a fresh install of Fresh, but it’s the same.
If you have any lead…
Thanks for the help !
9 Replies
@misteroom
Hi, I mention you here, if you have any idea about that. Thanks.
Looks like
Particles
variable is not a function. Maybe it's an issue related to how it's exported (https://github.com/tsparticles/preact/blob/main/components/preact/index.js).
Try to import it in a different way like import { Particles } from "..."
or something like that.Nope, doesn’t work neither.
Can you import everything and inspect what do you got? For example
This seems to work:
but you're using hooks and they don't work on server side
mmm… 😛
preact hooks can’t work SSR ?
I don't think so. They are designed to track changes after user interaction or data loading.
ok. I thought that maybe preact-render-to-string could make them usable.