React and React Native, 2nd Edition

Adam Boduch

買這商品的人也買了...

商品描述

Build applications for web and native mobile platforms with React, JSX, Redux, and GraphQL

Key Features

  • Explore how functional web development works with React, Redux, and React Native
  • Build apps with unified architecture with Facebook's React, Relay, and GraphQL
  • Understand the platform in-depth, from routing to server-side rendering

Book Description

This books takes you through using React 16 and React Native 0.5 to create powerful and engaging desktop mobile and native applications for all platforms.

You start by learning how to craft composable UIs using React, ranging from rendering with JSX and creating reusable components to routing and creating isomorphic applications that run on Node.js.

We then move on to show 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.

You will master handling application state, Unified Information Architecture, and using Flux, Redux, and Relay.

Towards the end of the book, you will learn how Flux ideas are encapsulated within React components using Relay and apply all the skills learned so far to create a React application that runs on every major platform.

What you will learn

  • Learn what has changed in React 16 and how you stand to benefit
  • Craft reusable components using the React virtual DOM
  • Learn how to use the new create-react-native-app command line tool
  • Augment React components with GraphQL for data using Relay
  • Handle state for architectural patterns using Flux
  • Build an application for web UIs using Relay

Who this book is for

This book is written for any JavaScript developer―beginner or expert―who wants to start learning how to put both of Facebook's UI libraries to work. No knowledge of React is needed, though a working knowledge of ES2017 will help you follow along better.

Table of Contents

  1. Why React?
  2. Rendering with JSX
  3. Component Properties, State, and Context
  4. Event Handling, the React Way
  5. Crafting Reusable Components
  6. The React Component Lifecycle
  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
  25. Why Relay and GraphQL?
  26. Building a Relay React App

商品描述(中文翻譯)

使用React、JSX、Redux和GraphQL在Web和原生移動平台上構建應用程序

主要特點:

- 探索使用React、Redux和React Native進行功能性Web開發
- 使用Facebook的React、Relay和GraphQL構建統一架構的應用程序
- 深入了解平台,從路由到服務器端渲染

書籍描述:

本書將帶領您使用React 16和React Native 0.5在所有平台上創建功能強大且引人入勝的桌面、移動和原生應用程序。

您將首先學習如何使用React創建可組合的UI,從使用JSX進行渲染和創建可重用組件到路由和創建在Node.js上運行的同構應用程序。

然後,我們將向您展示如何將React的概念應用於使用React Native構建原生UI。您將了解如何構建能夠在移動環境中正確處理用戶交互的響應式和簡化的UI。您還將學習如何訪問設備特定的API,例如地理位置API,以及如何使用React Native處理離線開發。

您將掌握處理應用程序狀態、統一信息架構以及使用Flux、Redux和Relay的技巧。

在本書的最後,您將學習如何使用Relay將Flux思想封裝在React組件中,並將迄今所學的所有技能應用於創建在每個主要平台上運行的React應用程序。

您將學到什麼:

- 了解React 16的變化以及您可以從中獲益
- 使用React虛擬DOM創建可重用組件
- 學習如何使用新的create-react-native-app命令行工具
- 使用Relay為React組件提供數據的GraphQL增強
- 使用Flux處理架構模式的狀態
- 使用Relay構建Web UI的應用程序

本書適合對象:

本書適合任何JavaScript開發人員,無論是初學者還是專家,都想開始學習如何使用Facebook的兩個UI庫。不需要了解React,但對ES2017有一定的工作知識將有助於更好地跟隨。

目錄:

1. 為什麼選擇React?
2. 使用JSX進行渲染
3. 組件屬性、狀態和上下文
4. 以React方式處理事件
5. 創建可重用組件
6. React組件生命周期
7. 驗證組件屬性
8. 擴展組件
9. 使用路由進行導航
10. 服務器端React組件
11. 面向移動的React組件
12. 為什麼選擇React Native?
13. 啟動React Native項目
14. 使用Flexbox構建響應式佈局
15. 在屏幕之間導航
16. 渲染項目列表
17. 顯示進度
18. 地理位置和地圖
19. 收集用戶輸入
20. 警報、通知和確認
21. 響應用戶手勢
22. 控制圖片顯示
23. 離線操作
24. 處理應用程序狀態
25. 為什麼選擇Relay和GraphQL?
26. 構建Relay React應用程序