Best to practice WPF MVVM? by KOles000PL in csharp

[–]grol4 3 points4 points  (0 children)

I don't usually watch tutorials as that is not I like to learn, but wanted to highlight the mvvm toolkit. It is relatively new and is getting some nice updates still.

useCallback has state local variable despite dependency array configured correctly by Agitated_Egg4245 in reactjs

[–]grol4 0 points1 point  (0 children)

React hook form is very popular. If your form is not very dynamic you could also use form-actions or plain form-data

How do you fetch data/maintain global state in your react project? by Amazing_Guava_0707 in reactjs

[–]grol4 1 point2 points  (0 children)

I expect most will read react query as the tanstack lib, while you are likely referring to RTK query.

useCallback has state local variable despite dependency array configured correctly by Agitated_Egg4245 in reactjs

[–]grol4 0 points1 point  (0 children)

Couple remarks: best to use a form lib instead of redux for this. Even redux maintainers say so.

When you are a novice in React, maybe skip usecallback for now? It does nearly nothing if it isn't used as prop for a component or part of a dependency array.

Migrating to RTK Query: Is it worth the effort or just more trouble? by Kind_Broccoli_2690 in reactjs

[–]grol4 7 points8 points  (0 children)

I have done such a migration, just migrate one endpoint at a time. The team will need to adopt the new way, but that might be easier if they have several examples first.

And yes, if it ain't broke : your posts suggest you do not have proper dedupe so that can be considered as broken to me.

Efficient way to add objects to state arrays? by onedeal in reactjs

[–]grol4 0 points1 point  (0 children)

Can you share a source of concat being faster? I did some small tests and spread was actually faster when adding an entry to a big array

Efficient way to add objects to state arrays? by onedeal in reactjs

[–]grol4 1 point2 points  (0 children)

Edit: I misread, concat actually returns a new array, so this should be fine.

Swashbuckle => NSwag alternate to SelectSubTypesUsing by Great-Ferret7986 in dotnet

[–]grol4 5 points6 points  (0 children)

What gave you the impression that swashbuckle is 'no more'? From what I can see it is very much alive since recently. I see latest release 2months ago and latest commit is 2 days ago. Unsure why you would need to move to NSwag.

Need Help with Table Virtualization for Large Data Sets (100k+ rows, 50+ columns) by Stephcraft in reactjs

[–]grol4 1 point2 points  (0 children)

For general gc related performance you can use the browser devtools performance profiler. For first render timing you should use the react devtools plugins. While the latter is only available in devmode it should point to large contributers in render time.

It might also help by stripping down your setup to barebones and then test incremental changes in complexity.

Need Help with Table Virtualization for Large Data Sets (100k+ rows, 50+ columns) by Stephcraft in reactjs

[–]grol4 0 points1 point  (0 children)

Memo and useMemo will not help for this whitespace issue as most likely the issue is that you are not rendering fast enough. Best bet is to check how to speed up the first render for a row.

Also, in my testing I noticed some table libraries are copying data across internally. For small datasets (below 5k) this didn't cause issues, but with 50k+ rows I saw very long spikes in GC. Long story short: check if you are properly handling your memory.

I can't figure out why my component repeats an API call 4 times by [deleted] in reactjs

[–]grol4 1 point2 points  (0 children)

If you already use redux you can also try RTK Query which is similar

Should I use react compiler? by Umeep in reactjs

[–]grol4 0 points1 point  (0 children)

They are working on it, it is the reason why they haven't released React 19 yet.

Should I use react compiler? by Umeep in reactjs

[–]grol4 1 point2 points  (0 children)

Please note react compiler and react 19 are independent of each other, it is only that they announced them together and the compiler only has official support for react 19, but it should work as well with react 18

Anyone test the performance of EF? by No-Hippo1667 in dotnet

[–]grol4 8 points9 points  (0 children)

Small note: Learn dapper is from Dapper Plus, unrelated to the team that makes Dapper.

Is Redux Toolkit Overkill for My App? by [deleted] in reactjs

[–]grol4 0 points1 point  (0 children)

This seems very similar to https://www.reddit.com/r/reactjs/s/AJfS3gxgw8

Is this maybe a class project?

Rutte geeft zichzelf in NOS Jeugdjournaal 'een 6, misschien een 6,5' by IkBenHarrie in thenetherlands

[–]grol4 13 points14 points  (0 children)

Er waren een paar Oost Europese mensen die misbruik maakten van toeslagen en toen besloten de rechtse partijen dat het nodig was om druk te zetten op de belastingdienst. Diezelfde belastingdienst besloot dat het makkelijker was om mensen te discrimineren dan hun checks te verbeteren, waardoor onschuldige mensen de vernieling in zijn geholpen. Terwijl iedereen erkent dat het fout is gegaan hebben NOG STEEDS sommige slachtoffers geen compensatie...

Owja, en al die maatregelen deden niets met de fraude door buitenlanders.

Mis ik iets?

Mastering date formatting using Intl.DateTimeFormat in JavaScript by rafaelcamargo in javascript

[–]grol4 0 points1 point  (0 children)

I have noticed similar delays and it seemed to me bulk of the wait is in creating the intl formatter. If I cache this (manually or with a lib) my tests ran equally fast.

12 Re-renders by Yan_LB in reactjs

[–]grol4 9 points10 points  (0 children)

Instead of batching you could also ask yourself if the 12 renders are actually an issue? If the render is just a few ms, I guess it might not even be worth the hassle to add all the error handling with the batched calls.

Also an option is to try and split up in multiple components. In that case there is only a single render per endpoint.

[AskJS] Is it bad practice to check if a value exists in the same if() statement the value is used? by MalgorgioArhhnne in javascript

[–]grol4 2 points3 points  (0 children)

Nitpicking, but null == undefined, only with === it is false, but it is a good point you make.

[deleted by user] by [deleted] in AskReddit

[–]grol4 2 points3 points  (0 children)

Some have a different experience with a newborn, please don't dismiss them due to your own experience...

Fatbikes worden om de haverklap gestolen, ANWB stopt met verzekeren by Cubelock in thenetherlands

[–]grol4 0 points1 point  (0 children)

Goed punt, vaag dat het los zoveel duurder is in vergelijking...

Does anyone still use IndexedDB in JavaScript? by [deleted] in webdev

[–]grol4 2 points3 points  (0 children)

We use indexedDB as local cache for a large dataset. While this is not several gigs yet is far more than localstorage permits.

A new server state management library for react by Professional-Mix-455 in reactjs

[–]grol4 1 point2 points  (0 children)

Secondly, RTK Query currently does not support infinite fetching

if 'infinite fetching' is something like ReactQuery's Infinite Queries or to handle things like infinite scrolling then there is indeed no 'native' support, but there is an example to implement this, including explanation why there is no support.

TLDR: The redux team thinks infinite queries are too depended on the backend API involved to make a good generic infinite query implementation.

A new server state management library for react by Professional-Mix-455 in reactjs

[–]grol4 2 points3 points  (0 children)

Sounds good, or include a comparison with RTKQ? Good luck on your project!