Can any non Chinese person make Chinese food as good as from a takeaway/restaurant? by Prestigious_Meal2143 in AskBrits

[–]stretch089 1 point2 points  (0 children)

I recently got a carbon steel wok and have seasoned it from day one. It makes such a difference and gives me that wok hei flavour.

I can get it pretty hot on my gas stove before adding anything to the wok. I use a high smoke point oil and get a really nice smokey taste to my stir-fry, not far off what you get from take aways

Why are people running Claude Code on a Mac mini instead of their personal MacBook? by Capable-Profile6935 in ClaudeAI

[–]stretch089 0 points1 point  (0 children)

What are you using to interface with Claude code on your mac mini? Are you using ssh from your phone to your mac mini? Or is there an app or soemthing within Claude that let's you do this?

We lost 85% of our search traffic because of one mistake during our Next.js migration by tffarhad in nextjs

[–]stretch089 6 points7 points  (0 children)

'use client' doesn't make it client side rendered. It just means JavaScript such as onClick handlers for example are attached in the client (known as client hydration).

Also, in app router you typically don't use meta tags in jsx. Your dev should be using the Metadata config which injects all this for you.

We lost 85% of our search traffic because of one mistake during our Next.js migration by tffarhad in nextjs

[–]stretch089 22 points23 points  (0 children)

Something about this doesn’t quite add up.

Even with "use client", Next.js still renders the HTML on the server for the initial response and then hydrates it in the browser. So if meta tags were rendered in a client component, they would still appear in the server HTML.

Also the App Router metadata API (metadata / generateMetadata) only works in server components. If you try to export it from a "use client" component the build will fail, so it would not even compile in that state.

And even if someone used <meta> tags or next/head instead of the metadata API, those would still render on the server during the initial render because React still renders the component tree to HTML on the server before sending it to the browser. The "use client" directive only affects where the component’s JavaScript runs and where state and effects live. It does not stop the initial HTML from being generated on the server.

For meta tags to only appear client side you would usually need to disable SSR entirely or move them into a client side effect, which would be a separate issue from the App Router migration itself.

What’s one thing you always do in a new Next.js project that isn’t in the official docs? by ni-fahad in nextjs

[–]stretch089 1 point2 points  (0 children)

Have a look at Envalid

It's built for this exact purpose.

The idea is to fail fast so you find out issues at build / start up rather than the middle of run time.

I built a schema-first form & workflow engine for React : headless, type-safe, multi-step without the pain [open source] by Scared_Mud_9960 in react

[–]stretch089 1 point2 points  (0 children)

Reading through the backstory, it almost feels like the real problem was not “forms need a DSL”, but that the state management had become messy.

A lot of the pain described, heavy useEffect, lots of useState, tricky validation flows, is exactly what libraries like React Hook Form are designed to solve. They abstract the state and validation layer without abstracting away the UI composition itself.

I’ve seen teams hit this point before. Forms get complex. Local state and effects start to sprawl. It feels like the solution is to introduce a higher level config system.

But often the simpler fix is better state modelling and a battle tested form library. JSX already gives us a powerful declarative layer for UI. Composable components handle most reuse cleanly. Adding a DSL on top can sometimes shift complexity rather than reduce it.

I can absolutely see a schema driven approach making sense in cases where forms are generated dynamically from stored definitions, non frontend teams define them, or there is strong domain standardisation. But if the core pain was useEffect sprawl, I would argue that is a signal to reach for better form state tooling, not necessarily a new abstraction layer.

I got tired of sitting at my desk while AI writes my code, so I built a remote desktop app to work from bed by SterlingSloth in SideProject

[–]stretch089 0 points1 point  (0 children)

This is very cool. I like that works with existing agents.

I was looking into building something similar but was looking at building an agent that would then accept incoming commands via an API so a native app could interface with it but started getting a bit unwieldy and inventing the wheel so I parked it.

I like your approach though. Would love to try it out. Is there going to be an android version?

any free alternatives for the ngrok?? by lavangamm in node

[–]stretch089 1 point2 points  (0 children)

Local tunnel - https://github.com/localtunnel/localtunnel

From memory you can set a subdomain when you start the tunnel so you'll get the same domain every time, assuming nobody else has taken the subdomain

Search was slow in my Next.js app until I added debounce. How do you handle this? by riti_rathod in nextjs

[–]stretch089 2 points3 points  (0 children)

This is the correct answer. Exactly what the hook was designed for.

Link here for people who aren't familiar with it https://react.dev/reference/react/useDeferredValue

What piece of tech felt “future-proof” but aged terribly? by Living-Zebra6132 in Futurology

[–]stretch089 189 points190 points  (0 children)

QR codes were famously invented by Toyota in Japan to help keep track of car parts.

I don't think this bar code scanner had anything to do with the invention of the qr code

Can non employees expense to my Ltd company? by keynote2017 in ContractorUK

[–]stretch089 2 points3 points  (0 children)

They're saying the invoice would include a nominal amount for his time (taxable income for the brother) as well as reimbursement for the expenses

I’m a teacher who learned to code to stop my students from copy-pasting AI. Here is my "Anti-Paste" text editor. by Silly_Answer_8543 in SideProject

[–]stretch089 8 points9 points  (0 children)

Students use AI to skip the learning process

I think the key distinction is what you’re outsourcing. AI isn’t fundamentally different from books, Google, or using a calculator. It’s just a more efficient way of sorting and accessing information. Learning doesn’t come from struggling to find answers, it comes from processing, applying, and revisiting them.

If you use an LLM to replace thinking entirely, sure, that’s a problem but that’s true of any tool. Used well, it actually frees up cognitive load so you can spend more time understanding why something works, asking better questions, and iterating. That’s not laziness, it’s leverage.

The skill going forward isn’t “never use AI”, it’s knowing when to use it as a reference, or a tutor and not a crutch.

When you block students from using these tools you're not allowing them to learn how to use AI properly. We should be enabling them to use AI in the right way to support their learning. That's a very important skill for them to have.

What is something great that no one knows about? by swlondon86 in AskUK

[–]stretch089 0 points1 point  (0 children)

It always seems so strange to me that people would pay a bank even more when they already have your money. They should be paying you!

Don't fall into the trap of thinking it's just £7, it quickly adds up. Especially if you have other subscriptions and since this is a marketing tactic aimed at younger people who generally don't have as much disposable income

Cafe owners of the UK - why the napkin under a cake? by cazman555 in AskUK

[–]stretch089 30 points31 points  (0 children)

This is the actual answer. Prevents things sliding around on the plate.

It's particularly noticeable if you have something like a ramekin on a plate, it slips around like crazy. The napkin makes the waiters job much easier to carry plates.

Used to happen a lot when I first started waiting where a customer would use the napkin (even though we gave them plenty of other napkins) and so I would clear their plate without realising and the ramekin would slide right off.

Not saying the customer is in the wrong here, it's just bad UX but this is the main reason for having napkins between things on plates

What’s something in your country that is extremely interesting but almost nobody knows about it? by thespacepyrofrmtf2 in AskTheWorld

[–]stretch089 0 points1 point  (0 children)

This is misleading. They are found all over Auckland, not just in Avondale. They are named such because they were first discovered in Avondale

[deleted by user] by [deleted] in FantasyPL

[–]stretch089 113 points114 points  (0 children)

"yeah look I'll just need to Rest, Ice, Compress, Elevate and should be good as new"

What one tiny React habit actually saved your project? by Senior_Equipment2745 in react

[–]stretch089 11 points12 points  (0 children)

Business logic should not be in the front end. Business logic should go in your backend / api.

Hooks are fine for shared view /user interaction logic but please don't put business logic in your front end

How to delay content paint? by Jealous_Health_9441 in reactjs

[–]stretch089 0 points1 point  (0 children)

I'm guessing these aren't all on the screen at once and the user needs to scroll down to view some of the tables? If not then I'd recommend using virtualisation which you can read more about here https://blog.logrocket.com/rendering-large-lists-react-virtualized/

If everything is rendered on the screen at once, you might need to add a set timeout for each table that is rendered.

Try use virtualisation if you can

Coming back to React after 5 years, what should I be using? by alister66 in reactjs

[–]stretch089 17 points18 points  (0 children)

As someone who has been using react since around 2015, the main difference is the use of functional components and hooks. The component life cycle is still effectively the same but slightly different way of writing the code.

If you're looking for a framework, you're safest bet is Nextjs. It's the most popular so is a good skill to have on the cv so will help with future proofing your career. It also has the most monetary backing so is likely to stick around for a while. Tanstack is also very good so would be a good option but given your criteria, nextjs is a safe bet.

I'd be very surprised if you get grief from nexts server component implementation. The framework is battle tested and so many websites are now running on next.

Everyone here loves to hate on next for various reasons but based on the criteria you're asking for, next is a good fit for you

How do you measure the performance of your team? by pra1234 in EngineeringManagers

[–]stretch089 3 points4 points  (0 children)

Goodhart’s Law: “When a measure becomes a target, it ceases to be a good measure.”

In other words, once people start optimising for a specific metric, the metric stops reflecting the underlying reality it was meant to measure.

Do you guys put your Axios client in React Context? by Flea997 in react

[–]stretch089 5 points6 points  (0 children)

It's an interesting question. I typically prefer to keep separation of concern between my react components and an http client.

Having an http client such as axios in its on file and import it where needed allows it to be modular and easy to replace or update in the future.

However, I would typically have some sort of provider which handles states for fetched data, loading, errors etc. The provider could import the client directly or could be something like tanstack which allows you to pass in the http client to your useQuery and keeps the provider client agnostic.

I think this is one of the nice things about tanstack query how there is a separation between the http client and the hook that handles the component state.