
React and React Native
By :

This book assumes you have a basic understanding of the JavaScript programming language. It also assumes that you’ll be following along with the examples, which require a command-line terminal, a code editor, and a web browser. You’ll learn how to set up a React project in Chapter 1, Why React?.
The requirements for learning React Native are the same as for React development, but to run an app on a real device, you will need an Android or iOS smartphone. In order to run iOS apps in the simulator, you will need a Mac computer. To work with Android simulator, you can use any kind of PC.
The code bundle for the book is hosted on GitHub at https://github.com/PacktPublishing/React-and-React-Native-5E. We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!
We also provide a PDF file that has color images of the screenshots/diagrams used in this book. You can download it here: https://packt.link/gbp/9781805127307.
There are a number of text conventions used throughout this book.
CodeInText
: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. For example: “You have the actual routes declared as <Route>
elements.”
A block of code is set as follows:
export default function First() {
return <p>Feature 1, page 1</p>;
}
When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:
export default function List({ data, fetchItems, refreshItems,
isRefreshing }) {
return (
<FlatList
data={data}
renderItem={({ item }) => <Text style={styles.
item}>{item.value}</Text>}
onEndReached={fetchItems} onRefresh={refreshItems} refreshing={isRefreshing}
/> );
}
Any command-line input or output is written as follows:
npm install @react-navigation/bottom-tabs @react-navigation/
drawer
Bold: Indicates a new term, an important word, or words that you see on the screen. For instance, words in menus or dialog boxes appear in the text like this. For example: “Select System info from the Administration panel.”
Warnings or important notes appear like this.
Tips and tricks appear like this.
Change the font size
Change margin width
Change background colour