fluid-type-scale-calculator icon indicating copy to clipboard operation
fluid-type-scale-calculator copied to clipboard

Migrate to SvelteKit

Open AleksandrHovhannisyan opened this issue 8 months ago • 2 comments

Swapped Next.js/React for SvelteKit as a learning exercise.

  • Tons of code removed. I found Svelte a lot more expressive and simple to work with.
  • Superforms is awesome and lets me leverage my JSON validation schema on the client and server. I had a work-in-progress branch for react-hook-form but it was so much boilerplate compared to this.

Notes:

  • Some (negligible) breaking changes to link sharing API. Will only impact users who were creating links by hand and omitting some query params. All params (except booleans) are now required. See updated README.
  • Form is no longer GET; Svelte requires enhanced forms to use POST. Without use:enhance, I can't use client-side validation with Superforms. This is an acceptable tradeoff, as I'm still able to parse form data out of the query params in the server.ts handler.

AleksandrHovhannisyan avatar May 24 '24 23:05 AleksandrHovhannisyan