3 ms·
I have written a lot of React and JSX. I have never used that pattern and don't plan to start. I use JS for my conditionals and never put them in JSX. Unless it
by rpedela 9y ago
I have written a lot of React and JSX. I have never used that pattern and don't plan to start. I use JS for my conditionals and never put them in JSX. Unless it is a extremely trivial component, I find putting logic inside JSX hard to read and debug.
- acemarke 9y agoAgreed. Here's a gist with my preferred approach for writing render methods: https://gist.github.com/markerikson/47fff93c92286db72b22bab5b02e2da3 https://gist.github.com/markerikson/47fff93c92286db72b22bab5... .