Giter Site home page Giter Site logo

SolidJS support about fastify-vite HOT 12 CLOSED

fastify avatar fastify commented on April 30, 2024 3
SolidJS support

from fastify-vite.

Comments (12)

yonathan06 avatar yonathan06 commented on April 30, 2024 1

I'm also interested in having an integration with SolidJs
I don't have much experience with SolidJs, but did a PR in my personal fork if you want to take a look with a basic implementation
https://github.com/yonathan06/fastify-vite/pull/1/files

this will take some time as I'm new to it (both SolidJs and Vite), so feel free to throw your thoughts

from fastify-vite.

galvez avatar galvez commented on April 30, 2024 1

We have a Solid example for fastify-vite now and full blown support in Fastify DX!

from fastify-vite.

gishmel avatar gishmel commented on April 30, 2024

I am interested in using this with a SvelteKit application; could we maybe work together on a PR to make it more framework agnostic? I am also not super familiar with this library though so it would take some time for me to read up but think I can help if we are working toward a more framework agnostic library; let me know if that's of interest.

from fastify-vite.

lxsmnsyc avatar lxsmnsyc commented on April 30, 2024

I'm not sure how will that play well, specially since both Svelte and SolidJS uses specialized compilers for their own.

from fastify-vite.

galvez avatar galvez commented on April 30, 2024

I'm interested in seeing how well the Renderer API will accommodate for this.

It may need further refinements, but I'd say it's close?

from fastify-vite.

lxsmnsyc avatar lxsmnsyc commented on April 30, 2024

The Renderer API seems to be sufficient enough based on what I've seen on React. On the other hand, there are some other features that SolidJS handles out-of-the-box (e.g. isServer, hydration scripts, etc.). I'll probably write a POC tomorrow and see if there's any issues.

from fastify-vite.

galvez avatar galvez commented on April 30, 2024

Another thing that needs to be done ASAP is writing a compiler for the production html.js — right now it's a just a chained series of .replace() calls but it needs to be a precompiled template — maybe using string-template?

from fastify-vite.

lxsmnsyc avatar lxsmnsyc commented on April 30, 2024

https://github.com/terixjs/fastify-vite/blob/main/packages/fastify-vite-react/html.js#L20-L31

I just checked it again. Is this markup placeholder being injected by fastify-vite?

Also just to add: https://www.solidjs.com/guide#hydration-script
SolidJS has its own hydration capabilities already managed and rendered into the SSR. I'm not sure how this would work with fastify-vite given that it has its own mechanism.

from fastify-vite.

galvez avatar galvez commented on April 30, 2024

I just checked it again. Is this markup placeholder being injected by fastify-vite?

Yep — that's the thing I want to start precompiling.

SolidJS has its own hydration capabilities already managed and rendered into the SSR. I'm not sure how this would work with fastify-vite given that it has its own mechanism.

I'm open to changes in the renderer API to accommodate for this.

from fastify-vite.

lxsmnsyc avatar lxsmnsyc commented on April 30, 2024

TBF, I feel like it can be mixed with Solid's generateHydrationScript if I have to assume that the hydration part is only for the hooks fastify-vite supplies.

Again, I'll have to write a PoC to see if there's any design issues, in which case I can probably suggest some.

from fastify-vite.

galvez avatar galvez commented on April 30, 2024

@yonathan06 Amazing, can I ask you to go ahead and put this is up as a PR to our dev branch? I can probably chime in to fill the gaps on the fastify-vite architectural site.

from fastify-vite.

yonathan06 avatar yonathan06 commented on April 30, 2024

@galvez sure, I think I need access to push the feature branch

from fastify-vite.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.