3 ms·
>The conditional in react is just pure JS. Who cares? You still write a JS conditional in the v-if string, right?
by sergiotapia 8y ago
>The conditional in react is just pure JS.
Who cares? You still write a JS conditional in the v-if string, right?
- MattRix 8y agoThat gets messy fast though. You start having to escape strings in your code, and potentially have a trickier time with autocompletion etc.
- kangoo1707 8y agothen write a method for it. Instead of v-if="currentUser && currentUser.id && ..." you can just write v-if="canDoStuff(currentUser)"
- crubier 8y ago> Who cares? Me. As a CTO I am not confortable having significant amounts of code embedded in strings inside html attributes. Also we use Flow / Typescript. React is typesafe and sound. No templates, no strings, just functions. This is the basis of the pyramids of developer's needs.
- sergiotapia 8y ago> This is the basis of the pyramids of developer's needs. Apparently not though, thousands of people use Angular, even more people use VueJS now.
- crubier 8y ago> thousands of people Animals*. Not people, FTFY. Joke aside though, I think this is an artifact of old school web development, which was a mess. People didn’t mind these kinds of hacks. But the number of people willing to accept such incongruities is going to go down in the next years as web development has now normalized into more sane practices that are standard in the software development world.