-
Notifications
You must be signed in to change notification settings - Fork 2.5k
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
[Feature] Preact Support #425
Comments
preactjs/preact#3327 has been published in 10.6.0, we can also merge in the |
I'm very excited about Preact support for Remix. What can I do to help? |
Hey @pspeter3 it should work as of now, the only thing we need to do different is the const documentElement = document.documentElement;
const apply = n => document.replaceChild(n, documentElement);
hydrate(x, {
childNodes: [documentElement],
firstChild: documentElement,
insertBefore: apply,
appendChild: apply
} This because of our algo getting a bit confused 😅 we're hoping to land a fix but looking into the best way currently |
Thanks! Is preactjs/preact#3328 the right issue to follow from the Preact side? |
Well that was an initial solution but we're trying to find a smaller (and maybe in core) one |
Is there an example repo with this work around used? Preact is awesome :D
|
After some hours of implementing Preact in Remix, I finally found how annoying not having access to the Bundler API can be. And even after patching Remix compiler.js file, it still didn't work because of compatibility between Preact 8 and Preact X, and I didn't manage to make Preact X work with ESBuild. It would be cool if Jovi guided us in the correct direction on implementing it in Remix, as Preact is a key factor in performance optimization. |
I would love to help out but we're not going to work on supporting 8 😅 else we'd be working on three major versions at once, I'll try to contribute a working example in the coming week |
@phiberber #1636 adds an example |
Is there any update on this? The example PR was closed with the status "we are waiting to get this natively supported". |
Haven't heard back about this 😅 |
Jovi, should've waited for the official implementation before deleting the example branch, anyone can follow the commit steps though. It has been a couple months already, I'm not even sure if this is going to be released this year, and based on this issue's activity, seems like thete is little to none demand (compared to other issues). |
I do know the Remix team really wants to make Remix front-end agnostic. Preact has always been at the top of their list. With summer vacations and the major update to React Router, I believe this work was put on hold. It should pick back up soon after the new "Remix" router lands (with the data API) and deferred support. |
There's also the remix routers repository, where work is being done to port There was also a tweet from Ryan himself playing around with Preact & HTM. He's importing what is a pre-release of the remix-router package, so I would presume there's some work that was already done. |
@LukasCornille I've done an initial pass of a Preact layer here: brophdawg11/remix-routers#19 |
Example with Deno https://twitter.com/ebey_jacob/status/1567055958727340032 |
What would it take to get official support at this point? |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Preact Support
<Scripts>
diffing on the client (change in Remix)Make <Scripts> render nothing on the client #390wip: attempt at preact hydration support #403<!DOCTYPE>
hydration skipping to Preact 10 (change in Preact)document.documentElement
replacement (change inpreact/compat
)The text was updated successfully, but these errors were encountered: