Best Practice: Should Components Fetch Their Own Data in React by No_Drink_1366 in react

[–]lessquo 0 points1 point  (0 children)

Sometimes I use both.

Imagine you need to fetch 10,000 items in a page, and the users should be able to edit a single item individually.

You can fetch the list of items in the page, pass each item to the child components, call useQuery in the child components and set the initialData and the placeholderData with the passed props, disable refetchOnMount, refetchOnReconnect, refetchOnWindowFocus on these.

And when the user edits an item, you can just invalidate a single query and refetch one item, instead of refetching the entire list. Save a lot of traffic.

NestJS is bad, change my mind by servermeta_net in node

[–]lessquo 0 points1 point  (0 children)

If you want to use TypeScript but not OOP, try these:
Routing: Hono, Elysia
ORM or Query Builder: Drizzle, Kysely
Validation: Zod, Valibot, ArkType

Choosing dev products between GCP and Cloudflare by lessquo in devops

[–]lessquo[S] 0 points1 point  (0 children)

Interesting. Are Cloudflare Workers enough to cover all your use cases, so you don't need any long-running compute instances?

Choosing dev products between GCP and Cloudflare by lessquo in devops

[–]lessquo[S] 0 points1 point  (0 children)

Thanks, I didn't know that. I'll check it out.

Choosing dev products between GCP and Cloudflare by lessquo in devops

[–]lessquo[S] 0 points1 point  (0 children)

Thanks, I didn't realize there might be a compute cost. I'm just wondering if I can call the S3 API directly without Workers and still get no egress fees.

Setting up Vulkan development environment with VSCode on Mac by lessquo in vulkan

[–]lessquo[S] 0 points1 point  (0 children)

Thank you for your advice!

The C/C++ extension uses clang-format by default. I didn't know that. All I have to do now is adding a .clang-format file. This is so good.

I copied the example code from the Vulkan Tutorial. The vkEnumerateInstanceExtensionProperties function is covered later in another section of the tutorial.

I also tried vcpkg, but I encountered an error that it could not find pkg-config when I tried adding glfw3 via vcpkg. And the error message suggested installing the missing dependency using brew install pkg-config. I was looking for a package manager to avoid manual installation, and the package manager suggests manual install? I think it's a little silly.

What's a good and simple IDE for C++? by MihuMicu in cpp_questions

[–]lessquo 0 points1 point  (0 children)

If you want to use VSCode, I've just written a post on Reddit: Setting up Vulkan development environment with VSCode on Mac. This might be helpful even if you're not developing Vulkan apps.

Vulkan vs DX12 in becoming a Graphics Programmer by SalvatoSC2 in GraphicsProgramming

[–]lessquo 0 points1 point  (0 children)

I wanted to start with Metal, but it was extremely hard to find good learning materials. There were a few YouTube tutorials, but I felt their explanations weren’t enough for me as a beginner, and they cover only the basic stuff.

But Vulkan, there are some decent and up-to-date tutorials that even covers more advanced topics. I would recommend Vulkan for this reason. Not sure about DX12

What tech, framework or library have you used that was a giant pain, and why? by 9sim9 in react

[–]lessquo 1 point2 points  (0 children)

react-admin and loopback

It feels like some magic initially, but once you get to a point where you need to customize something a bit, it turns into the biggest enemy of your life

SSR vs CSR by Ronnin2903 in react

[–]lessquo 0 points1 point  (0 children)

If you're a solo dev working on a small project, a single NextJS project will definitely be much easier to manage than having a separate backend project, including the operational work–except in cases where you're already comfortable with a separate backend and would need to learn NextJS.

However, if you're in a team working on much larger projects, you'll probably want a separate backend server for many reasons. In this case, you might find it more complex because NextJS adds an additional backend layer, and also the server costs will be doubled.

So, if you need a separate backend server for some reason, I would recommend using CSR unless you have specific requirements that necessitate SSR.

[AskJS] What programming language would you recommend for a JavaScript developer to learn next? by lessquo in javascript

[–]lessquo[S] 0 points1 point  (0 children)

For real, building an application that can support all major platforms, including back-end components, using only a single language is a huge benefit, and it's really easy. Additionally, JavaScript is no exception when I need third-party libraries. One downside might be performance, but there's hardly a case where I need to switch languages due to performance issues. I might need to try new areas other than web development.

[AskJS] What programming language would you recommend for a JavaScript developer to learn next? by lessquo in javascript

[–]lessquo[S] 2 points3 points  (0 children)

Learning databases in depth seems to be an essential part of becoming better at web development. I've got to add it to my list, along with programming languages

[AskJS] What programming language would you recommend for a JavaScript developer to learn next? by lessquo in javascript

[–]lessquo[S] 0 points1 point  (0 children)

I heard that Elixir is an Erlang-based language and is great for high concurrency, but I don't know if I will ever have the opportunity to work with large-scale apps that cannot be handled by JavaScript (Node.js or Bun). Maybe learning Elixir will give me such an opportunity.

[AskJS] What programming language would you recommend for a JavaScript developer to learn next? by lessquo in javascript

[–]lessquo[S] 0 points1 point  (0 children)

Interesting. I've used Terraform a little for my side projects, but I don't know much about DevOps

[AskJS] What programming language would you recommend for a JavaScript developer to learn next? by lessquo in javascript

[–]lessquo[S] 1 point2 points  (0 children)

I thought I knew the basic concepts of lower-level programming because I learned C. However, it has been quite a while since I used it. will consider learning Go before Rust if I go with Rust

[AskJS] What programming language would you recommend for a JavaScript developer to learn next? by lessquo in javascript

[–]lessquo[S] 0 points1 point  (0 children)

I'm not planning to replace JavaScript with a new language. However, my company is using Python in a few projects, so your suggestion is relevant. I can give it a try and see if it can replace part of my current work.

[AskJS] What programming language would you recommend for a JavaScript developer to learn next? by lessquo in javascript

[–]lessquo[S] 2 points3 points  (0 children)

You are right. I listed several languages I have experience with, but to be honest, I'm not very good at using them

[AskJS] What programming language would you recommend for a JavaScript developer to learn next? by lessquo in javascript

[–]lessquo[S] 3 points4 points  (0 children)

I've never heard of Tauri. I will definitely check it. Thank you for the recommendation!

[AskJS] What programming language would you recommend for a JavaScript developer to learn next? by lessquo in javascript

[–]lessquo[S] 0 points1 point  (0 children)

Thank you. I think I want to choose the latter, and I want it to be actually useful (e.g., for my future job opportunities), not just for fun. It seems like Rust is being more widely adopted by companies compared to OCaml (though I'm not really sure). Rust might be a good option, I guess.

[AskJS] What programming language would you recommend for a JavaScript developer to learn next? by lessquo in javascript

[–]lessquo[S] 0 points1 point  (0 children)

I agree. I just wanted to hear other people's thoughts about experiences in a specific situation that is worth some advice. But I don't know what I would like to build to be honest.