News for hackers. Stuff that matters.

sachinraja

Re:Vite 3.0 on Wednesday July 13, 2022 @12:50PM (#32085329)
Vite is not built in Go, esbuild is. esbuild is not the only reason why it's fast either, see https://vitejs.dev/guide/why.html.
Re:Vite – Next Generation Front End Tooling on Sunday July 03, 2022 @02:55PM (#31970039)
If anything, Vite is less complexity. It's much easier to use and configure than any other build tool I've used. If you don't have a need/want for Vite, that's fine, but others enjoy using it. I am not fretting over the next build tool, I'm simply switching to something I prefer to use.
Re:Vite – Next Generation Front End Tooling on Sunday July 03, 2022 @02:50PM (#31970013)
If they don't have knowledge of the frontend build world, then maybe they'll have to do a bit more reading. Who should Vite's landing page target?
Re:Vite – Next Generation Front End Tooling on Sunday July 03, 2022 @02:46PM (#31969973)
Vite does not throw out any experience. It builds upon Rollup, esbuild, and other existing tools.

There's a great page on how it's cutting edge here: https://main.vitejs.dev/guide/why.html. I suggest you try using it to see for yourself.

Re:Vite – Next Generation Front End Tooling on Sunday July 03, 2022 @02:43PM (#31969957)
Vite could use swc for compiling in the future.
Re:Vite – Next Generation Front End Tooling on Sunday July 03, 2022 @02:41PM (#31969941)
I don't think anyone is expecting an existing production project to switch over. Vite offers amazing DX for new projects though. Just because something is solved doesn't mean it can't get better.
Re:The new wave of React state management on Saturday July 02, 2022 @01:04PM (#31960668)
How is React not solving essential problems? Suspense solves a pretty essential issue. Also Svelte can quickly increase in bundle size and if you have enough components, it can become bigger than the equivalent in other frameworks: https://github.com/yyx990803/vue-svelte-size-analysis.
Re:TRPC: End-to-end typesafe APIs made easy on Friday May 06, 2022 @08:49PM (#31291158)
Using TS type inference to its fullest is a major part of tRPC so I don't think it has much of a benefit to you if you're ok with generation.

In my experience, you can iterate more quickly without generation. I've used GraphQL and having a separate system to generate code and types was not a good experience. If not done properly, your schema and types can also easily be out of sync.

Re:TRPC: End-to-end typesafe APIs made easy on Friday May 06, 2022 @07:55PM (#31290798)
You can't provide typesafety (with TypeScript) across the frontend and backend for multiple languages without codegen. There's no intention for this to be strictly JS, but there's no easy way to offer this for multiple languages.

There will be an openapi generator some time in the future so that could help with generating clients for other languages (https://github.com/trpc/trpc/issues/1724).

Re:TRPC: End-to-end typesafe APIs made easy on Friday May 06, 2022 @07:44PM (#31290715)
It can be made to work with any framework with a proper adapter. NestJS is quite opinionated though so I suspect the two will not work well together.
Re:TRPC: End-to-end typesafe APIs made easy on Friday May 06, 2022 @07:40PM (#31290691)
Thanks for clarifying!
Re:TRPC: End-to-end typesafe APIs made easy on Friday May 06, 2022 @06:07PM (#31290066)
I don't believe there's anything really preventing the use of server-side events. The Websocket implementation is via an adapter and special client so I think the same could be done for SSE (probably achievable in an external package too).
Re:TRPC: End-to-end typesafe APIs made easy on Friday May 06, 2022 @05:56PM (#31289974)
Could you elaborate on this? What part of tRPC do you think is unsound due to the type system?
Re:TRPC: End-to-end typesafe APIs made easy on Friday May 06, 2022 @05:52PM (#31289945)
tRPC offers typesafety across your frontend and backend without needing to generate any code. This makes it so updates in your backend "router" are immediately reflected in your frontend code. You can't use gRPC with TypeScript without codegen. tRPC may be more familiar to TS/Node.js devs too.