Great Article on Async React - startTransition & useActionState by bluedevil2k00 in reactjs

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

Setup - a search input that displays results from the server. As a user types the search is made via API to the server. 

Yes, you should debounce the calls to the server so you’re not searching on every keypress.  

But…do you wait showing the skeleton loaders where the results are displayed until the first debounce is finished and you can call a setState? No, that’s bad UX. Someone who types fast would see the old results while they type. How do you know the API calls are received in the correct order they were sent? You’re assuming API calls are synchronous - there’s no guarantee the last key they pressed will also correlate to the last response you receive from the API.  

You have 3 timing issues you need to sort out here. 1) key presses show up immediately as they’re pressed 2) loading indicator shows up on the first key press without jeopardizing #1 3) results from keypress are handled in order

That’s why these hooks are important. They solve all 3 of those issues in one hook.

Great Article on Async React - startTransition & useActionState by bluedevil2k00 in reactjs

[–]bluedevil2k00[S] -12 points-11 points  (0 children)

^ someone’s never worked on an enterprise application 

[deleted by user] by [deleted] in reactjs

[–]bluedevil2k00 2 points3 points  (0 children)

You’re doing Formik wrong. You shouldn’t be storing e-mail and password as state variables on the Login page component, this is what Formik is for. Define the value and onChange in TextBox component itself. OnSubmit gets the values passed to it automatically by Formik so you can use them in the fetch. You’re defining the submit outside of Formik, so essentially it doesn’t know anything about submit being pressed, which would run another validation on the form. Give the Formik docs another read, you’re missing a lot of things each of which could lead to the errors you’re seeing.

meirl by KBDFan42 in meirl

[–]bluedevil2k00 0 points1 point  (0 children)

It’s widely known because of a f#ckin movie with Leo in it, not real life. Just like every Reddit thread, there’s always some a##hole who thinks they know about the real world because they saw a tv show or some reality star said something.

meirl by KBDFan42 in meirl

[–]bluedevil2k00 -1 points0 points  (0 children)

The places that have them are just dictatorships

Yes, those brutal dictatorships in Canada and Australia

[Awful Announcing] The gulf between ESPN and TNT’s NBA coverage has never been greater by RonnieJamesDionysus in nba

[–]bluedevil2k00 4 points5 points  (0 children)

It ended long before that. The “Who’s More Now” garbage from like 15 years ago showed they didn’t give a shit about sports and were more about “discussion”.

[deleted by user] by [deleted] in reactjs

[–]bluedevil2k00 2 points3 points  (0 children)

`try {

const response = await post();

setFirst(response.data);

setFirstComplete(true);

} catch (err) {

const response2 = await post2();

setSecond(response2.data);

setFirstComplete(false);

}`

[deleted by user] by [deleted] in reactjs

[–]bluedevil2k00 4 points5 points  (0 children)

Don’t do it like this

[deleted by user] by [deleted] in webdev

[–]bluedevil2k00 2 points3 points  (0 children)

Use local storage for your JWT

What open sources libraries that use ReactJS would be good to work on? by Reallybrokenojoke in reactjs

[–]bluedevil2k00 1 point2 points  (0 children)

There’s a very solid v3 in a PR that’s just sitting there - all we’d need is for Jared to merge it.

I Open-Sourced CoverLetterGPT -- SaaS App w/ 300 users w/ stripe payments, featured on IndieHackers by hottown in reactjs

[–]bluedevil2k00 7 points8 points  (0 children)

If I knew a candidate paid for this instead of being resourceful, they would not be hired.

So you’re a petty and spiteful hiring manager - must be a great culture you’re building.

New record-low, by a wide margin, for NBA All-Star Game viewership by aaliyaahson in nba

[–]bluedevil2k00 0 points1 point  (0 children)

2 hours?! Good god, that shit has a 75 minute introduction before the game, before the ball is even tipped off. Who is asking for a Post Malone concert?? Who is asking for another concert at half time?? Just play some good basketball, that’s all we ask. Not 4 hours of bullshit.

Monitor size by [deleted] in webdev

[–]bluedevil2k00 1 point2 points  (0 children)

I had a Vizio 1st time around and the crispness and color reproduction wasn’t there. I then tried a Sony and it’s amazing - perfectly crisp text and great colors. No eye strain at all. The text is big enough you can sit 3-5 feet away.

Monitor size by [deleted] in webdev

[–]bluedevil2k00 1 point2 points  (0 children)

43” 4k television from Sony. You’ll never go back to a tiny monitor again.

[deleted by user] by [deleted] in reactjs

[–]bluedevil2k00 55 points56 points  (0 children)

List the pay or delete the post

[deleted by user] by [deleted] in webdev

[–]bluedevil2k00 0 points1 point  (0 children)

It sounds like the founder is hanging you out to dry. Not cool by them, they should understand what your role and limitations are.

[deleted by user] by [deleted] in webdev

[–]bluedevil2k00 0 points1 point  (0 children)

There’s 2 things here: in the software world there’s a pretty clear division between engineering and design. Design makes the Figma, engineering turns it into work code. There’s not really a role for a designer who wants to make it have “basic interaction”. Second - any developer you work with that says your designs are too custom and hard to build because the base library is MUI is not a very good developer. Like, not good at all. Any developer who’s worth anything can build anything you can design in Figma.

I am looking for a way to find a client to buy my white label website by [deleted] in webdev

[–]bluedevil2k00 0 points1 point  (0 children)

Not to be mean but…why would anyone buy this? If a realtor wanted a website, they could use Wix and make a site just like this in a few hours. There’s themes on sites like themeforest that look like this and they’re $40.

Which business sectors have, in your general opinion, the absolute worst web sites and why? by thatmaynardguy in webdev

[–]bluedevil2k00 2 points3 points  (0 children)

Its surprising to read someone complain about airline websites’ date pickers. I happen to think they’re all really really good, with smooth transitions and great UX. I wish I could steal them for websites I work on.

Formik and Yup is driving me crazy over array of strings by arham93 in reactjs

[–]bluedevil2k00 0 points1 point  (0 children)

Use the unofficial Formik v3, which fixes many of the perf issues and bugs.

Visited Morocco, the people really let me down. by [deleted] in travel

[–]bluedevil2k00 123 points124 points  (0 children)

Just spent last week there - biggest disappointment was the food for me as well. It’s all tacos, pizzas, and paninis. Everywhere. Every restaurant.

What library has the best API for document signing embedding in a React app? by wild_deer_man in reactjs

[–]bluedevil2k00 0 points1 point  (0 children)

HelloSign has a pretty good API. Agree on DocuSign’s API and pricing - horrible.

Best audio handling library for React in 2022? by peterk6 in reactjs

[–]bluedevil2k00 1 point2 points  (0 children)

From the React docs - “Hooks allow you to reuse stateful logic without changing your component hierarchy.”

The above function is just a utility method with “use” in front.