<h1>${router.title}</h1>
<ul class="nav navbar-nav">
<li repeat.for="row of router.navigation" class="${row.isActive ? 'active' : ''}">
<a href.bind="row.href">${row.title}</a>
</li>
</ul>
Which is almost identical in JSX: <h1>{router.title}</h1>
<ul className="nav navbar-nav">
{router.navigation.map(row => (
<li className={row.isActive ? 'active' : ''}>
<a href={row.href}>{row.title}</a>
</li>
))}
</ul>
For loops and map functions aren't necessarily business logic, but they are view logic (and you'll see them in any sort of tempting or view system). React actually makes it very bad to include any substantial business logic into your templates as the render function is called many many times potentially whenever your data changes, so you want to include very minimal stuff in there.> You'll also need to worry about how you run BDD tests for specifications and scenarios. How can this be achieved in React as you write test suites for user stories and non-UI acceptance tests? How will this impact your continuous delivery/integration systems as well? You'll have to rewrite all your test suites into Jest, right?
Exactly the same! At the end of the day, React is just Javascript. You still have your models in their own classes or functions, with your own API helper methods. How you write that doesn't change - no need for Jest. We're testing our entire app - including templates/views - using Mocha (and we're about to run tests in Karma in real browsers pretty soon).