2️⃣ Inline logical `&&` This works cuz the curlies ( {} ) in JSX take any JS expression. When the condition is false React renders nothing. When it's true React renders the UI I avoided this early on cuz formatting would get gnarly but Prettier made this a non-issue πŸ§΅πŸ‘‡πŸΎ

React

1️⃣ Element variables We can conditionally assign JSX to a variable & render that variable. Can use `if-else` or `switch` This used to be my preferred way of conditional rendering cuz I liked that it kept the JSX "clean". But I came around to the more popular options πŸ§΅πŸ‘‡πŸΎ

React

Devs coming to React from templating languages like Handlebars are often surprised that JSX doesn't have built-in conditional syntax Well, JSX is "Just JavaScript"β„’ and I've seen 6️⃣ ways we can use JS to conditionally render UI in React components /thread πŸ§΅πŸ‘‡πŸΎ

React

useSWR instead of useState while calling APIs! It gives data from the cache then sent a request to the server for validating, finally combine the data for data consitensy. #100DaysOfCode #React #javascript #Tips #programming https://t.co/N0T7M1T3JS

React

Let's Learn React βš›οΈ Lesson 6️⃣: Stateful & Stateless Components Stateful & Stateless components have many different names. They are also known as: πŸ”Ή Container vs Presentational components πŸ”Ή Smart vs Dumb components Tap the image below to read more πŸ‘‡πŸ»

React

Let's Learn React βš›οΈ Lesson 8⃣: The differences between Props and State Find it useful? Hit the like and RT Winking face #100DaysOfCode #React

React

Let's Learn React βš›οΈ Lesson 9️⃣: What are Default Props? πŸ€” Default Props are helpful in enabling you to offer a better UX through your app. But how? Tap the image below to find out πŸ‘‡πŸ» Find it useful? Like & RT is appreciated πŸ™‚ #100DaysOfCode #React

React

React TypeScript tip πŸ’‘ Passing down the result of `useState()` to a child? Use `Dispatch<SetStateAction&lt;T>&gt;` in order to type the setter πŸ‘‡πŸΌ Otherwise you won't be able die pass a callback to the setter.

React

use-unmount-signal is a React Hook for canceling promises like network requests when a component is unmounted. Β· Standards-friendly: works with any web or Node API that takes an AbortSignal Β· Tiny: 269b minified/167b Brotli Β· New: tell me if it's useful https://t.co/zCpO2uRUgr

React

Just realised that JSX has a syntax to support generics

React

Hate having to name your styled components? This one liner <Div /> component is for you! πŸ€“πŸ’… Live demo + discussion: https://t.co/OrJgKoQFPT

React

Using React from CDN? Add <script crossorigin> attribute and check the headers. This is important for better error handling DX in React 16!

React

The tweet will be reviewed and posted as soon as possible

{{ newSnippetForm.errors.url[0] }}

{{ newSnippetForm.errors.categories[0] }}