React Native uses Flexbox to layout most components, which makes it easy to run your app on devices of many different screen sizes. We’ll learn the basics of Flexbox in React Native, and how to use it to build a flexible screen layout. We’ll also look at some differences between flexbox on the web and on mobile.
Why is it necessary to have the braces around restaurants.map() ?
We're inside of JSX there, so in order to run javascript inside of JSX, you have to wrap it in { }. If you didn't wrap it, JSX would think you were trying to display text (outside of a text block, so it would cause an error in this case)
Is that any javascript? When i move the restaurants array inside the {} i get unexpected token error.
@George: I'm not sure I fully understand what gave you the error; could you give a code sample?