top | item 16689201

(no title)

rhapsodyv | 8 years ago

I thought the same. But, as I started to work with react in a side project, now I really enjoy it. In the beginning is a really mess. But, as you begin to think in a "data stream oriented way" (like you do in Haskell with lists), your templates look like any regular framework. It stay isolated in a function with no more than value substitutions. You even can separate in a different file. The only really JS code I have mixed with html has "if" and "map/for" statements. This is, yet, the uglier part for me (at least, now). BTW: I don't use redux (and I never will!).

discuss

order

ggregoire|8 years ago

Not sure how this

    {isVisible && <div>Hello World</div>}
is uglier than

    <div ng-if="isVisible">Hello World</div>
or

    <div v-if="isVisible">Hello World</div>
or

    {{#if isVisible}}
        <div>Hello World</div>
    {{/if}}
Plus, isVisible in React is not a string but a variable, so you can use Rename Symbol and Find All References on it, inspect its value in your browser's debugger, inspect its type if you are using TS or Flow, and so on.