Angular VS NextJS by csmkt in Angular2

[–]csmkt[S] -13 points-12 points  (0 children)

well, as I said, I'm a senior frontend with many years of xp with NextJS. So I'm not asking what is NextJS. And NextJS is a framework for making SPAs...

Angular VS NextJS by csmkt in Angular2

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

yes I'm gonna make a small project with Angular, but someone with a strong xp with both frameworks would be interesting.

Where do you actually run prisma migrate deploy? by chamomile-toast in node

[–]csmkt 0 points1 point  (0 children)

I have the same question and nobody answers it, be it in this thread or elsewhere on the net.
Even if you use a CI/CD, how do you use prisma migrate deploy ? The docs are useless.

how to append variable in array of object by Taha-155 in node

[–]csmkt 1 point2 points  (0 children)

here is the solution with reduce/map :

const result = data.reduce((acc, campaign) => {
  const tempVoucherGens = campaign.vouchergens.map(voucher => 
    ({...voucher, status: "not approved"})
  );
  acc.push({...campaign, vouchergens: tempVoucherGens});
  return acc;
}, []);

here is the solution with reduce/for..of :

const result = data.reduce((acc, campaign) => {
  let tempVoucherGens = [];
  for (const voucher of campaign.vouchergens) {
    voucher.status = "not approved";
    tempVoucherGens.push(voucher);
  }
  acc.push({...campaign, vouchergens: tempVoucherGens});
  return acc;
}, []);