clearlight

u/clearlight



r/nextjs•

I'm wondering thoughts and if there is any difference in the following approaches to wrapping pages with a layout in Next.JS App Router.

The documented approach is to add another `layout.tsx` file in the directory for the route, which is fine.

However, another approach is to manually wrap the page component with the layout which appears to also work well.

Wrapping the page component in a layout means we can add some additional logic, e.g to determine a dynamic layout for the page using the available page data and it's potentially easier to reuse layout components.

Here's a sample to illustrate the two approaches

app
├── layout.tsx
├── page.tsx
└── section
    ├── p
310

r/Wellington•

Is there somewhere close to Wellington that is drivable where one can see and play with some snow?

I know sometimes there’s snow up on the ranges. When that happens is there somewhere with snow accessible by car?

In particular looking for somewhere that young kids could easily get to in a car to access.

720


r/nextjs•

I have some pages that a dynamically rendered at runtime and don't use dynamic route parameters.

For example, a simple route url such as `/resources`

The pages query heavy API data to render. I'd like to prefetch the pages during build time so the API queries run and the data is cached before the first user visit.

If they were using dynamic params, I'd use `generateStaticParams` but these routes don't have dynamic parameters.

Is there a recommended way to prefetch such dynamically rendered pages during build?

77

r/diynz•

If I’m cutting a length of timber to fit between two other pieces of timber, how much extra length should I add to the cut to ensure a snug fit?

For example if the gap is 1160mm should I cut the timber insert at +2mm to make sure it fits snugly?

As more info for my current case the timber is pine and I’m making some boxing trim recessed inside a window reveal to install insect mesh screen on. I’m wondering how much extra to cut the trim to ensure a snug fit for the box shape inside the the window reveal.

14

r/nextjs•

I understand Next will cache the RSC payload in the route cache. However I’m not sure if the components are cached across requests, or per request.

For example, if the same component is used on another route, will it use the same component cache?

51

This is my first post here.

I'm looking into investing 400K and am pretty naive about what to do.

I'm currently debt free and generally quite risk adverse and conservative in approach to investment.

I'm considering a term deposit or a PIE fund at around 5.5-6% p/a interest return.

Property is possible, but I don't really want to contribute to the insanity that is the NZ property market and keen for a simpler, low risk investment if possible.

I'm also not very materialistic and ok with just a reasonable return.

Some questions I had were

  1. If I invest in term deposit, does the declared RWT rate need to include the expected income from the term deposit interest (i.e that would push m
11


r/Wellington•

I've been pondering, as a major sushi seller, St Pierre's sushi must sell so many sushi packs a day. All of them using single-use plastic trays. What a waste!

Why don't they follow the lead of other food outlets and use eco-friendly sushi trays? It would make a difference.

I like their sushi but it's putting me off buying from them.

Come on St Pierre's use more eco-friendly packaging!

8968

r/Wellington•

My car (Mercedes Benz B200 2006) has developed a transmission issue that appears not cost effective to repair.

The dealer mechanic has said it requires a new electronic transmission control unit, quoted at ~5K for the part + labour extra.

Otherwise it's been working fine, but no longer. I even updated the speakers and aircon blower fan recently.

I'm considering scrapping the car, somehow disposing of where it could be re-used for secondhand parts. It has a lot of things still working fine on it.

Are there any recommended places or ways to dispose of an old car for parts in Wellington?

635

r/nzev•

I’ve just bought a 2020 Nissan Leaf, imported from Japan, and loving it.

The Nissan Connect control panel been set to English, however it’s still showing Japan for the GPS maps, with some other Japanese quirks.

Is there anyway to set it or swap it out or configure it so it’s the full NZ version of Nissan Connect?

The model is “ZE0” “ZE1” type with the “G” trim spec.

I don’t mind paying a Nissan dealer if they can do it.

511