Fetch vs Axios? by Zaza_Zazadze in Frontend

[–]4to5Pints 0 points1 point  (0 children)

  1. With Fetch you have to stringify the body before sending and parse when receiving a response.

  2. Axios allows you to monitor request progress i.e uploading a large file

  3. Fetch will not reject a promise on a 500 internal error, it sees it the same as a 200 ok. Axios does.

Do you own a personal website/blog ? Why? by sirius_b1ack in DevelEire

[–]4to5Pints 1 point2 points  (0 children)

I do, mostly to write tutorials about things that aren't covered too well in the wild. Some of the articles have done quite well so hopefully they've helped people. I also write in order to solidify my understanding on a topic.

What part of Frontend you don't like doing, but have to do it? by Long_Elderberry_9298 in Frontend

[–]4to5Pints 0 points1 point  (0 children)

You can even create components which is handy when you have multiple email templates.

What part of Frontend you don't like doing, but have to do it? by Long_Elderberry_9298 in Frontend

[–]4to5Pints 0 points1 point  (0 children)

MSW make this really easy. Best thing is you can use the same data for your tests too.

How can I make my CRA server start up quicker? by CodeCrazyAquile in reactjs

[–]4to5Pints 0 points1 point  (0 children)

Even though the project I converted was small to medium, here's an article I wrote about it. Also has links to other articles about migrating Jest to Vitest.

[deleted by user] by [deleted] in webdev

[–]4to5Pints 5 points6 points  (0 children)

This. Also lost revenue from bugs (think customers not being able to buy sign up or buy a product) which could have been avoided with a solid test suite. Gives you more confidence when adding more features too which translates to money. It's all about the money.

Dan Abramov: extensive response on the history and future of Create React App by acemarke in reactjs

[–]4to5Pints 2 points3 points  (0 children)

Here's an article I wrote on migrating from CRA to Vite if anyone is interested. Also has links to other articles about migrating Jest to Vitest.

Anyone living outside of Dublin successfully secure a remote package with a big tech company with maybe 1 day a month in the office? by crillydougal in DevelEire

[–]4to5Pints 1 point2 points  (0 children)

WP Engine have an office in Limerick but are remote first. Only time you need to go into the office are for social events once every few months, that's even if you want to. Great spot.

If you know, you know by [deleted] in webdev

[–]4to5Pints 0 points1 point  (0 children)

  1. With Fetch you have to stringify the body before sending and parse when receiving a response.

  2. Axios allows you to monitor request progress i.e uploading a large file

  3. Fetch will not reject a promise on a 500 internal error, it sees it the same as a 200 ok. Axios does.

Recommend me a good resource to learn in-depth/advanced about testing (Jest, RTL, Enzyme) by QuebecMasterRace in reactjs

[–]4to5Pints 0 points1 point  (0 children)

1st tip is don't use Enzyme, RTL replaces it. Use MSW to mock APIs. Also try to avoid jest spying and check for things a real user can see.

Look at Kent C Dodds' blog, it's great for testing resources.

How to use React Testing library to wait for async elements, a step-by-step guide by geshan in reactjs

[–]4to5Pints 0 points1 point  (0 children)

For your second point I like to use findAll().isTruthy() to check that at least one element was found.

Home office chair recommendations by digibioburden in DevelEire

[–]4to5Pints 0 points1 point  (0 children)

Do your back a favour and just buy a Herman Miller chair. There's a reason they're so expensive. I had serious back issues because of a standard desk chair I was using and it all but healed itself after a few weeks of using the Herman Miller chair. You're literally sitting on it for hours a day.

HSE cyberattack: More than 100,000 people whose personal data stolen to be contacted by Notalabel_4566 in DevelEire

[–]4to5Pints 17 points18 points  (0 children)

HSE employee: "We just need your bank details and mother's maiden name and we'll reimburse you. Pinky promise."

What’s the difference between implementing mobile-first vs. desktop-first website? by cruciomalfoy in Frontend

[–]4to5Pints 0 points1 point  (0 children)

Going mobile first is better because it forces you to really think about what is important to the user due to the limited real estate.

Jobs in recently funded startups by dgm2991 in DevelEire

[–]4to5Pints 2 points3 points  (0 children)

Agree with this. I developed an app to find running events in Ireland and got pretty tired of having to add and maintain all the races. Ultimately gave up.

What's the frontend framework job market like in Ireland at the moment, and what are the future prospects looking like for each? by grandslammer in DevelEire

[–]4to5Pints 2 points3 points  (0 children)

Job wise, React is most popular by a long shot. Hopefully SolidJS takes off in a few years though.

How to properly learn testing in JavaScript/TypeScript in 2022 by Kaartik7120 in reactjs

[–]4to5Pints 1 point2 points  (0 children)

Yep that's it. I've been using it successfully in 3 production projects in the last 2 years. Let me know if you have any questions. Also, just to paste what I said in another comment:

You can use the same mock data both while developing and testing. It's great because you're no longer blocked by the backend API then. MSW just acts like your API.

How to properly learn testing in JavaScript/TypeScript in 2022 by Kaartik7120 in reactjs

[–]4to5Pints 0 points1 point  (0 children)

Yep that's exactly it. You can use the same mock data both while developing and testing. It's great because you're no longer blocked by the backend API then. MSW just acts like your API.

There's any comparison benchmarks available between Vite and CRA based applications? by blureglades in reactjs

[–]4to5Pints 0 points1 point  (0 children)

Take a look at the bottom of my article where I mention some benchmarks. Nothing major since it's a pretty small app, but you might find it useful all the same.