3 ms·
You don't have to, you can create a simple 1 line component to turn it into a declarative style. It's the benefit of having a full language instead of a templa
by manigandham 7y ago
You don't have to, you can create a simple 1 line component to turn it into a declarative style.
It's the benefit of having a full language instead of a template DSL for rendering. Declarative syntax is easy inside of an imperative flow, doing the opposite tends to lead to problems though.
- the_duke 7y agoYou don't need a one line component, you can just declare an extra variable before your main JSX. A redundant extra component is bad for performance.
- manigandham 7y agoI know. That's what the poster didn't like so I suggested an alternative.