DEV Community

Discussion on: 4 Ways to Render JSX Conditionally in React

 
joelbonetr profile image
JoelBonetR 🥇

If you use a conditional return at the beginning of your function you can prevent everything else to execute, useEffects, useStates, whatever custom function and so on so this pattern is very used TBH, can't see the issue with it, it's pretty understandable, and useful in tones of different architectures. 🤷🏻‍♀️