News for hackers. Stuff that matters.
Re:What's new in Svelte: November 2022 by com2kid on Wednesday November 09, 2022 @04:36PM (#33538233)
My personal story with Svelte:

I was able to write an internal website, very input form heavy, in about 4 days, having never used Svelte before. I estimate the same work would have taken me a minimum of 2-3 weeks using React + Redux. FWIW I've written tens of thousands of lines of React.

Svelte's state management is so simple to use, if you are writing some sort of CRUD app, use Svelte, not React.

Re:What's new in Svelte: November 2022 by emadabdulrahim on Wednesday November 09, 2022 @04:53PM (#33538467)
Does any body uses Redux these days? For forms, native FormData api covers most of the use cases without the need to manage any state. And for more advanced use cases, React Hook Form is the best https://react-hook-form.com/.

For other types of state management, use:

- react-query: Server cache (api requests and cache results, mutations, etc)

- Zustand of Zotai for actual application state management (only if necessary)

Re:What's new in Svelte: November 2022 by com2kid on Wednesday November 09, 2022 @07:24PM (#33540366)
> Does any body uses Redux these days?

New projects, hopefully not, but there are untold millions of lines of existing code out there that use Redux, in code bases that will continue to grow their usage of redux.

Re:What's new in Svelte: November 2022 by samarthr1 on Wednesday November 09, 2022 @08:54PM (#33541149)
What exactly is wrong with redux though?
Re:What's new in Svelte: November 2022 by com2kid on Thursday November 10, 2022 @02:00AM (#33543159)
Tons of unnecessary code overhead for doing very simple operations.

For simple forms, redux buys you nothing, but it is easily 3x the code.

Re:What's new in Svelte: November 2022 by mckravchyk on Thursday November 17, 2022 @10:56AM (#33640737)
One change to one item in the global store will fire up subscriptions for every single item in the store. I don't care how fast those comparison checks are thanks to Immutable.js, it's still a big waste of CPU.
Re:What's new in Svelte: November 2022 by livindub on Wednesday November 09, 2022 @10:49PM (#33541979)
May I suggest Formik instead of react hook forms. The way it handles internal form state has always seemed more intuitive to me.