From 0eba1d36e3e577b9869bb715e5052f8caf37c012 Mon Sep 17 00:00:00 2001 From: Kamran Ahmed Date: Fri, 12 Aug 2022 19:18:48 +0400 Subject: [PATCH] Add conditional rendering content --- .../104-conditional-rendering.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/content/roadmaps/103-react/content/100-react-fundamental-topics/104-conditional-rendering.md b/content/roadmaps/103-react/content/100-react-fundamental-topics/104-conditional-rendering.md index 1f66ef1f0..d7d733948 100644 --- a/content/roadmaps/103-react/content/100-react-fundamental-topics/104-conditional-rendering.md +++ b/content/roadmaps/103-react/content/100-react-fundamental-topics/104-conditional-rendering.md @@ -1 +1,11 @@ -# Conditional rendering \ No newline at end of file +# Conditional Rendering + +In React, you can create distinct components that encapsulate behavior you need. Then, you can render only some of them, depending on the state of your application. + +Conditional rendering in React works the same way conditions work in JavaScript. Use JavaScript operators like [if](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/if...else) or the [conditional operator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Conditional_Operator) to create elements representing the current state, and let React update the UI to match them. + +Free Content +Conditional Rendering + + +