patdx / worker-experiments

Mini experiments with Cloudflare workers like HTMX, etc
https://cloudflare-pages-htmx.pages.dev/
11 stars 1 forks source link

Problems #2

Closed patdx closed 1 year ago

patdx commented 1 year ago

(1)

Even though I cleared the entry.client.tsx file of React imports, the browser side bundle still includes all of React as well as a router manifest, etc. This defeats the purpose of using something like htmx where we want the browser side bundle to be very small. Maybe if I convert routes/index.tsx to a regular API route instead, it will stop importing React into the browser bundle.

(2)

It is awkward to pass htmx hx attributes especially with TypeScript and various nested components. It may help to have some kind of autcomplete or hook, etc.

patdx commented 1 year ago

I found a better approach that does not use remix: https://github.com/patdx/htmx-experiments/tree/main/packages/cloudflare-pages-htmx