Closed AndreBClark closed 4 years ago
Hello @AndreBClark,
Sorry it's the first time I've heard about Preact.
In Particles.tsx
the first two lines are about React as you can see in the link below
Does Preact work with these kind of requirements? The particles core it's vanilla TypeScript, no framework required so they should work. (The TypeScript library output is a window
based Javascript and ES6/.d.ts files)
You can try porting the Particles.tsx
in Preact to see if it's the React dependency the issue.
I don't know how to do that. ordinarily. I would use preact-compat
to alias react and react-dom. but it still comes up with a blank <canvas>
.
Preact is a lightweight alternative to react, I'm currently using for building web ads. for most things, Preact is interchangeable with react especially with the preact-compat issue, but in this case I'm not even getting an error
https://preactjs.com/guide/v10/switching-to-preact
Preact Compatibility is likely out of scope for this project. it probably needs it's own package. if you disagree feel free to reopen this.
I tried importing and adding the component from the minimal example:
to a component on my preact app and it comes up blank
is particle.js or react-particle-js not compatible with Preact? is there any other info I can provide?