Superforms
ts-reset
Superforms | ts-reset | |
---|---|---|
23 | 20 | |
1,879 | 7,588 | |
- | 0.8% | |
9.9 | 4.2 | |
6 days ago | about 2 months ago | |
TypeScript | TypeScript | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Superforms
-
Building a dynamic form with Svelte and Typescript
This next step is probably the easiest. Since you're also sending the select platform template, you can reference that to determine if the data is valid (why not try superforms? I made an adapter for it).
- Superforms 2 for SvelteKit has just been released
-
Ask HN: If you were to build a web app today what tech stack would you choose?
- Superforms (https://superforms.rocks/)
-
Working with forms in SvelteKit coming from React
There are libraries for handling form submissions with builtin integrations for validations libraries, like react-hook-form with @hookform/resolvers for React, and we have superforms for SvelteKit, that handles validation with zod, they both are made for the same purpose.
-
Is tRPC redundant with SvelteKit?
I personally think SvelteKit's type-safety + something like https://superforms.vercel.app/ (or just plain zod if you prefer) is perfect.
-
Suggest Best Svelte Libraries
sveltekit-superforms: Making SvelteKit validation and displaying of forms easier than ever
-
Sveltekit Auth Starter Project with Lucia auth, Skeleton UI, Prisma, Zod and Super Forms.
I made a Sveltekit Auth starter if anyone needs a starting point for an app. A demo is here. It is an open source auth starter project utilizing Lucia for authentication, Skeleton for ui elements, Prisma for database connectivity and type safety and Sveltekit for the javascript framework. I also used Zod and Superforms to handle form validation and management. It has email verification, password reset, and will send an email if the user changes their email address to re-verify it. It is released as open source under an MIT license.
-
Is Sveltekit ready to be used to develop some large-scale projects on it?
Image Virtualization i18n FormValidation Etc...
-
Svelte Kit is the best web framework I’ve ever used
I've been enjoying working with Superforms
-
Superforms now has full SPA support and realtime client-side validation. Check out this library for all your SvelteKit form needs!
Thank you for the suggestion, check it out now: https://superforms.vercel.app/
ts-reset
-
Unleashing the Power of TypeScript: Improving Standard Library Types
TypeScript's standard library contains over 1,000 instances of the any type. There are many opportunities to improve the developer experience when working with strictly typed code. One solution to avoid having to fix the standard library yourself is to use the ts-reset library. It is easy to use and only needs to be imported once in your project.
-
Why doesn't TypeScript properly type Object.keys?
You might like TS Reset: https://github.com/total-typescript/ts-reset, which fixes this particular problem. I don't personally find it to be a big issue though.
Regarding runtime type checking, if you were to write something that can handle the total space of possible TS types, you would end up with incredibly complex machinery. It would be hard to make it perform, both in terms of speed and bundle size, and it would be hard to predict. I think Zod or perhaps https://arktype.io/ which target a reasonable subset are the only way to go.
-
Javascript vs typescript
https://github.com/total-typescript/ts-reset <-- this fixes the `(string | undefined)[]` issue and a few other quirks. Obviously it's annoying to need a library to fix quirks, but better than nothing.
-
Books/resources to improve TypeScript knowledge
Dude is an actual TypeScript wizard, his ts-reset package is a must have when dealing with JSON. He was featured in the VS Code day streams to show off some introductory TypeScript concepts and my big takeaway from that stream was this VS Code extension. Just stick // ^? on the line after something and it shows the type of the line above. Amazing with Prisma.
-
Typescript really hits the middle ground between extremely rigid statically typed languages on one extreme and no types at all dynamic languages on another extreme. Best type system
Personally I quite like ts-reset to "fix" some of the std lib types - JSON.parse will now return unknown. It's then up to you to decide how you wish to parse that unknown (zod, runtypes, io-ts are all reasonable options here). Won't ever be done by TS itself, as generating runtime code is a non-goal for the project.
-
Free Next.js Boilerplate for ⚡️High-Performance⚡️ Enterprise Apps
🛠️ Extremely strict TypeScript - With ts-reset library for ultimate type safety
-
How to construct this tuple type?
Ok, answered it myself: it was a perfect use case for ts-reset: https://github.com/total-typescript/ts-reset
- A 'CSS reset' for TypeScript, improving types for common JavaScript API's
What are some alternatives?
felte - An extensible form library for Svelte, Solid and React
zod - TypeScript-first schema validation with static type inference
svelte-final-form - High performance subscription-based form state management for Svelte
ts-async-kit - the easiest API to deal with promises in Typescript. Currently, ↩️ Retrying 🏃♂️ looping & 😴 sleeping
sveltekit-flash-message - Send temporary data after redirect, usually from endpoints. Works with both SSR and client.
garph - Fullstack GraphQL Framework for TypeScript
svelte-use-form - The most compact reactive form controller (including Validation) that you'll ever see.
sonner - An opinionated toast component for React.
react-hook-form - 📋 React Hooks for form state management and validation (Web + React Native)
nuxt-scheduler - Create scheduled jobs with human readable time settings
svelte-headless-table - Unopinionated and extensible data tables for Svelte
suspense - Utilities for working with React Suspense