This is the code repository for React and React Native, Sixth Edition, published by Packt.
Build cross-platform JavaScript and TypeScript apps for the web, desktop, and mobile
The authors of this book are - Mikhail Sakhniuk, Adam Boduch, and Rodrigo Lobenwein
Welcome to your big-picture guide to the React ecosystem.
If you're new to React and looking to become a professional React developer, this book is for you. This updated sixth edition reflects the current state of React 19, including the latest hooks, server-side rendering with Next.js 15, and React Native with Expo.
Part 1 introduces you to React. You'll discover JSX syntax, hooks, functional components, and event handling, learn techniques to fetch data from a server, and tackle the tricky problem of state management. Once you're comfortable with writing React in JavaScript, you'll pick up TypeScript development in later chapters.
Part 2 transitions you into React Native for mobile development. React Native goes hand-in-hand with React. With your React knowledge behind you, you'll appreciate where and how React Native differs as you write shared components for Android and iOS apps. You'll learn how to build responsive layouts, use animations, and implement geolocation.
By the end of this book, you'll have a big-picture view of React and React Native and be able to build applications with both.
- Explore React architecture, component properties, state, and context
- Work with React Hooks for handling functions and components
- Fetch data from a server using the Fetch API, Axios, and React Query
- Dive into internal and external state management strategies
- Build robust user interfaces for mobile and desktop apps using Material-UI
- Perform unit testing for your components with Vitest and mocking
- Manage app performance with server-side rendering, lazy components, and Suspense
- Build cross-platform mobile apps with React Native and Expo
This unique book introduces both React and React Native, giving you a big picture view of the React ecosystem.
- Why React?
- Rendering with JSX
- Understanding React Components and Hooks
- Event Handling in the React Way
- Crafting Reusable Components
- Type-Checking and Validation with TypeScript
- Handling Navigations with Routes
- Code Splitting Using Lazy Components and Suspense
- User Interface Framework Components
- High-Performance State Updates
- Fetching Data from a Server
- State Management in React
- Server-Side Rendering
- Unit Testing in React
- Why React Native?
- React Native Under the Hood
- Kick-Starting React Native Projects
- Building Responsive Layouts with Flexbox
- Navigating between Screens
- Rendering Item Lists
- Geolocation and Maps
- Collecting User Input
- Responding to User Gestures
- Showing Progress
- Displaying Modal Screens
- Using Animations
- Controlling Image Display
- Going Offline
If you feel this book is for you, get your copy today!
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.
| Chapter number | Software required (With version) | Free/Proprietary | Download links | OS required |
|---|---|---|---|---|
| Whole book | Git | Free | Download | Windows, macOS, Linux |
| Whole book | Node.js | Free | Download | Windows, macOS, Linux |
| Coding | Visual Studio Code | Free | Download | Windows, macOS, Linux |
| React chapters | React 19 | Free | Download | Windows, macOS, Linux |
| React Native chapters | Xcode (for iOS simulator) | Free | MacOS App Store | macOS |
| React Native chapters | Android Studio (for Android simulator) | Free | Download | Windows, macOS, Linux |
| React Native chapters | Expo Go (without simulator) | Free | Play Store or App Store | iOS or Android |
You can get more engaged on the discord server for more latest updates and discussions in the community at Discord
If you have already purchased a print or Kindle version of this book, you can get a DRM-free PDF version at no cost. Simply click on the link to claim your free PDF.
We also provide a PDF file that has color images of the screenshots/diagrams used in this book at GraphicBundle
Mikhail Sakhniuk is a seasoned software engineer skilled in TypeScript, React, and React Native. He has a decade of broad experience in the tech industry, with a specialized focus on frontend development for the past 7 years. His professional journey includes working with startups, fintech firms, and large product companies boasting over 50 million users. Currently, Mikhail is Principal Frontend Engineer at KappaPay.
Adam Boduch has been involved in large-scale JavaScript development for nearly 15 years. Before moving to the frontend, he worked on several large-scale cloud computing products using Python and Linux. No stranger to complexity, Adam has practical experience with real-world software systems and the scaling challenges they pose.
Rodrigo Lobenwein is a Tech Lead and full stack engineer with hands-on experience in React, TypeScript, .NET, and modern cloud-based architectures. His background in business and management, combined with his expertise in software development, allows him to understand real-world needs and translate them into effective technical solutions. He drives technical excellence and quickly becomes a key reference within engineering teams. He has previously collaborated with Packt Publishing as a technical reviewer and is passionate about understanding the core of problems and finding effective solutions, always eager to teach and explain concepts to different audiences using real-world examples.