---
title: "Discussion on \"Conditionally rendering JSX in React functions\" | Hashnode"
description: "Discussion on \"Conditionally rendering JSX in React functions\". You might have occasion to render your JSX in React only in certain conditions. Like maybe if no props were passed to the function, rather than give an error, you just want nothing on the page instead.\nThe obvious thing to do would be this:\nconst App..."
url: "https://hashnode.com/posts/conditionally-rendering-jsx-in-react-functions/608d69cda3716542f363f2c9"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Conditionally rendering JSX in React functions](https://blog.nicm42.me.uk/conditionally-rendering-jsx-in-react-functions?utm_source=hashnode&utm_medium=feed)

You might have occasion to render your JSX in React only in certain conditions. Like maybe if no props were passed to the function, rather than give an error, you just want nothing on the page instead. The obvious thing to do would be this: const App...

May 1, 2021 · 1 min read · blog.nicm42.me.uk  
Read the article

-   [#reactjs](https://hashnode.com/tag/reactjs)

## Written by

[Nic](https://hashnode.com/@nicm42)

@nicm42 · England

  
[View profile](https://hashnode.com/@nicm42)

This week I learnt...

Front End Developer. I like problem solving and making things pretty. I also like red.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
