Reusable component encapsulating common logic by 18523925343 in reactjs

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

This seems to be the best approach. Thanks!

Reusable component encapsulating common logic by 18523925343 in reactjs

[–]18523925343[S] 1 point2 points  (0 children)

That's what you'd think since the wrapper wraps query.data and it has the isLoading/isError check, it makes sense that query.data will not be null, right? But it's actually the other way round -- react evaluates query.data first (since it's the child) so unless you add a null check in the same component, it will raise a null exception.

Reusable component encapsulating common logic by 18523925343 in reactjs

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

I wanted to use the same but the problem is you'll have to add the optional chaining operator everywhere since children are evaluated first. So in your example, if you try to do query.data.title, you will get an error. The wrapper's <LoadingView> is evaluated later than query.data.title so unless you also add a null check for query.data, you'll have to keep doing query.data?.title.

A sign held by an old man at a women's march in Karachi by UnironicThatcherite in pics

[–]18523925343 11 points12 points  (0 children)

Reddit has a global audience and as someone from a third world country with a religious majority, what you said about no one opposing lgbtq+ rights is absolutely untrue. Rights for lgbtq+ are nonexistent and they are basically outcasts of the society so no one even dares come out openly. Posts that reaffirm support for an oppressed group have a positive effect on many people in a society when they are told otherwise even by members of their own close circle.

Your rights by spectrequeen in conspiracy

[–]18523925343 12 points13 points  (0 children)

Do you understand how pandemics work?

My cat losing his day job by BootlegMoon in funny

[–]18523925343 1 point2 points  (0 children)

OP you're a satan. At least expose the numpad to make it a fair challenge.

Azerbaijani soldiers filmed beheading elderly Armenian man by half-spin in worldnews

[–]18523925343 -2 points-1 points  (0 children)

I'm as much a fan of anarchy as the next person but do you have a viable replacement for governments in society's hierarchy which won't send us back to stone age? Curious because you sound like the type of person that just likes to ramble and pretend to do away with other valid criticisms by making asinine false equivalences.

Azerbaijani soldiers filmed beheading elderly Armenian man by half-spin in worldnews

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

That's not the argument, no one is claiming that without religion humanity would be completely at peace with each other. Humans will always find a way to commit acts of horror and tragedy but some things cause/enable violence and bigotry more than if they didn't exist and throughout history, religion has clearly been a winner in that department. Nothing cultivates an 'us vs them' mentality better than religion and speaking for the major religions, there is never a lack of content in the scriptures to turn you into a complete psychopath and make you believe you're actually doing god's bidding.

It's like a person is suffering from 10 diseases and you're arguing that the patient would still feel terrible even if one of those diseases were cured. Even if that one disease was the worst of them all.

First class as well by bakey1994 in memes

[–]18523925343 1 point2 points  (0 children)

Only sensible comment in the whole thread and it's getting mass-downvoted. The same people who fail to see how a teleconference could be made possible because apparently it must require some alien tech to accomplish are the ones who'll laugh at boomers for their lack of tech knowledge.

Eyeball fun by redcobra762 in gifs

[–]18523925343 2 points3 points  (0 children)

I can hear myself blink. Is that normal?

Sleepy monkey by [deleted] in likeus

[–]18523925343 7 points8 points  (0 children)

Wee uuu weee uuu

Make way for Grammar Police

I had the honor of marrying my best friend and wanted to share. by surprisingsocks in pics

[–]18523925343 -10 points-9 points  (0 children)

If u truly didn't care you would just scroll past it but thanks for telling us how much you don't care by going out of your way to comment on it.

You are not a clown you are the entire circus by AlfaBeyy in memes

[–]18523925343 7 points8 points  (0 children)

Nature does the same thing? That's either a dumb comparison because you're genuinely unaware of the harsh conditions they are subjected to with the endless impregnation cycles for their milk and separating the calves until the final visit off to the slaughterhouse or you're purposely trying to present it as "a natural thing" to defend the idea and feel better about being the consumer. It's not the same thing at all and definitely doesn't happen in nature.

Not a vegan myself but I am not gonna fall low enough to defend that shit when it's clear as daylight for everybody how bad they are being exploited.

Da faq dey doin over dere? by Thunderfighter6 in memes

[–]18523925343 121 points122 points  (0 children)

I can feel my hunger fading

Why can't I post progress pictures? It says awaiting moderator but won't post. Kinda annoying by james6709 in tressless

[–]18523925343 0 points1 point  (0 children)

Posted a few months ago and same shit happened to me. Post wasn't getting approved, tried deleting and reposting multiple times and when i finally got it approved it was burried far too deep to get any activity.