<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/check-and-check-zccqgstdl" -->

---
title: Check and Check | daily.dev
description: A React code snippet shows a redundant authorization check where the same condition `(isAdmin || canSeeResults)` is evaluated twice — once to render an outer...
canonical: https://daily.dev/posts/check-and-check-zccqgstdl
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Check and Check | daily.dev
og:description: A React code snippet shows a redundant authorization check where the same condition `(isAdmin || canSeeResults)` is evaluated twice — once to render an outer...
og:url: https://daily.dev/posts/check-and-check-zccqgstdl
og:image: https://api.daily.dev/og/posts/zcCqgSTDl.png
og:image:alt: Check and Check
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Check and Check

**[The Daily WTF](https://daily.dev/sources/thedailywtf)** · 1 min read · 4 upvotes · 0 comments

## Summary

A React code snippet shows a redundant authorization check where the same condition `(isAdmin || canSeeResults)` is evaluated twice — once to render an outer wrapper div and again immediately inside it to render a button. The inner check is completely redundant since it can never evaluate differently from the outer one, making the double condition pointless.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://thedailywtf.com/articles/check-and-check>

## Similar posts on daily.dev

- [Coerce the Truth Out of You](https://daily.dev/posts/coerce-the-truth-out-of-you-ftdd8j9zp) · The Daily WTF · 1 upvotes · 1 comments
- [Over and Under Reaction](https://daily.dev/posts/over-and-under-reaction-hjbs8c4rk) · The Daily WTF · 1 upvotes · 0 comments
- [Awaiting A Reaction](https://daily.dev/posts/awaiting-a-reaction-tmpm6gsjy) · The Daily WTF · 0 upvotes · 0 comments
- [Stop Trusting AI Code Blindly: A React Code Refactoring Case Study](https://daily.dev/posts/stop-trusting-ai-code-blindly-a-react-code-refactoring-case-study-wibvkpwvb) · freeCodeCamp · 5 upvotes · 0 comments
- [How to Avoid Overusing useCallback and useMemo in React](https://daily.dev/posts/how-to-avoid-overusing-usecallback-and-usememo-in-react-sjjyd2g8d) · freeCodeCamp · 11 upvotes · 0 comments

---

Tags: [#react](https://daily.dev/tags/react)

[View this post on daily.dev](https://daily.dev/posts/check-and-check-zccqgstdl)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Check and Check","url":"https://daily.dev/posts/check-and-check-zccqgstdl","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/check-and-check-zccqgstdl"},"datePublished":"2026-06-08T11:33:37.717Z","dateModified":"2026-06-08T11:34:00.871Z","description":"A React code snippet shows a redundant authorization check where the same condition `(isAdmin || canSeeResults)` is evaluated twice — once to render an outer...","image":"https://media.daily.dev/image/upload/s--VDukGCjf--/f_auto/v1722860399/public/Placeholder%2002","thumbnailUrl":"https://media.daily.dev/image/upload/s--VDukGCjf--/f_auto/v1722860399/public/Placeholder%2002","isAccessibleForFree":true,"articleSection":"The Daily WTF","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"The Daily WTF","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/d21a6aa61a7244d893a3b3284df8e2ef","url":"https://daily.dev/sources/thedailywtf"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/check-and-check-zccqgstdl","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":4},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"react","timeRequired":"PT1M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"The Daily WTF","item":"https://daily.dev/sources/thedailywtf"},{"@type":"ListItem","position":3,"name":"Check and Check"}]}
```

