New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
use preact instead of react #45
Comments
Hi! I definitely hope to support Preact at some point but to my knowledge I'll keep the issue open but it's low priority until the core functionality becomes more stable. |
I was curious so I made an attempt to set up preact here: https://github.com/patdx/rakkasjs/pull/1/files It seems to be working including prerendering however some features like client-side routing seem to crash, and no hot reloading feature. https://github.com/patdx/rakkasjs/pull/1/files When I tried building the kitchen sink app, here is the size with React:
Here is the size with Preact:
The gzipped difference is smaller than I expected. From a distribution/testing perspective, it is also complicated by the fact that preact needs |
I have my own experiment going on here: https://stackblitz.com/github/rakkasjs/rakkasjs/tree/release/preact/examples/preact It uses Client-side navigation doesn't work at all in dev. That's probably fixable but, in production, although it works, you will see a flash of a blank page before the new page is rendered. That's not fixable: Preact doesn't support concurrent mode yet so it's incompatible Rakkas's data fetching system. But it's still somewhat usable as long as you don't use My Cloudflare Workers bundle size difference is 41K uncompressed and slightly below 11K with |
is there any way to use preact rather than react. Currently preact/compat doesn't seems to work
The text was updated successfully, but these errors were encountered: