Use React and React Native to build applications for desktop browsers, mobile browsers, and even as native mobile apps
About This Book
Build React and React Native applications using familiar component concepts
Dive deep into each platform, from routing in React to creating native mobile applications that can run offline
Use Facebook’s Relay, React and GraphQL technologies, to create a unified architecture that powers both web and native applications
Who This Book Is For
What You Will Learn
Craft reusable React components
Control navigation using the React Router to help keep your UI in sync with URLs
Build isomorphic web applications using Node.js
Use the Flexbox layout model to create responsive mobile designs
Leverage the native APIs of Android and iOS to build engaging applications with React Native
Respond to gestures in a way that’s intuitive for the user
Use Relay to build a unified data architecture for your React UIs
React and React Native allow you to build cross-platform desktop and mobile applications using Facebook’s innovative UI libraries. Combined with the Flux data architecture and Relay, you can now create powerful and feature-complete applications from just one code base!
This book is split into three parts. The first part shows you how to start crafting composable UIs using React, from rendering with JSX and creating reusable components through to routing and creating isomorphic applications that run on Node.
We then move on to showing you how to take the concepts of React and apply them to building Native UIs using React Native. You’ll find out how to build responsive and streamlined UIs that can properly handle user interactions in a mobile environment. You’ll also learn how to access device-specific APIs such as the geolocation API, and how to handle offline development with React Native.
Finally, we’ll tie all of these skills together and shows you how you can create React applications that run on every major platform. As well as understanding application state in depth, you’ll learn how to leverage Relay to make feature-complete, data-driven web and native mobile applications.
Style and approach
Split into three major sections to help organize your learning, this hands-on, code-first book will help you get up to speed with React and React Native—the UI framework that powers Netflix, Yahoo, and Facebook.
Table of contents
React and React Native
- React and React Native
- About the Author
- About the Reviewer
- Customer Feedback
- 1. Why React?
2. Rendering with JSX
- What is JSX?
- Just like HTML
- Describing UI structures
- Creating your own JSX elements
3. Understanding Properties and State
- What is component state?
- What are component properties?
- Setting component state
- Passing property values
- Stateless components
- Container components
- 4. Event Handling – The React Way
5. Crafting Reusable Components
- Reusable HTML elements
- The difficulty with monolithic components
- Refactoring component structures
- Rendering component trees
- Feature components and utility components
6. The React Component Lifecycle
- Why components need a lifecycle
- Initializing properties and state
- Optimize rendering efficiency
- Rendering imperative components
- Cleaning up after components
- 7. Validating Component Properties
- 8. Extending Components
- 9. Handling Navigation with Routes
- 10. Server-Side React Components
- 11. Mobile-First React Components
- 12. Why React Native?
- 13. Kickstarting React Native Projects
- 14. Building Responsive Layouts with Flexbox
- 15. Navigating Between Screens
- 16. Rendering Item Lists
- 17. Showing Progress
- 18. Geolocation and Maps
- 19. Collecting User Input
- 20. Alerts, Notifications, and Confirmation
- 21. Responding to User Gestures
- 22. Controlling Image Display
- 23. Going Offline
24. Handling Application State
- Information architecture and Flux
- Unified information architecture
- Implementing Redux
- Scaling the architecture
- 25. Why Relay and GraphQL?
- 26. Building a Relay React App
- Title: React and React Native
- Release date: March 2017
- Publisher(s): Packt Publishing
- ISBN: 9781786465658
You might also like
Hands-On Full-Stack Web Development with GraphQL and React
Unearth the power of GraphQL, React, Apollo, Node, and Express to build a scalable, production ready …
Learn React with TypeScript 3
Start developing modern day component based web apps using React 16, Redux and TypeScript 3 with …
Over 66 hands-on recipes that cover UI development, animations, component architecture, routing, databases, testing, and debugging …
Learn React Hooks
Create large-scale web applications with code that is extensible and easy to understand using React Hooks …