Einstein in Berlin
Authors: Thomas Levenson
ISBN-10: 0553378449
ISBN-13: 9780553378443
Edition 版次: Reprint
Publication Date 出版日期: 2004-02-03
Print Length 页数: 496 pages
Book Description
By finelybook
You’ll get hands-on practice by building a series of small components and micro apps — no big monolithic app here. The bite-size apps will have you reviewing concepts until they’re second nature.
What does the book cover?
An introduction to React 16.9 (the latest one,with Hooks)
Easy project setup with Create React App (you’ll be running code within minutes)
Debugging strategies for when things go wrong
Master JSX syntax,including “if”s,loops,and dynamic child components
Use props to make reusable components and communicate between them
How PropTypes can save you debugging time and help “future you” remember how to use the components you wrote
Use the “children” prop to render dynamic content
How to write React in modern ES6 Javascript,with just-in-time notes about ES6 syntax
How input controls work in React
Where and how to properly use state in your app
Learn the lifecycle of a component (and how to achieve the same results with the useEffect hook)
Learn to use the React Context API to pass data deeply through your app without prop drilling
Build stateful function components with React Hooks!
How to use each hook individually,and in combination
useState for simple state
useEffect for side effects (and you’ll learn what a “side effect” is)
useReducer for more complex state
useContext to easily pull data out of Context
useRef for inputs and more
The book has more than 17 step-by-step examples of React concepts,as well as 42 exercises to reinforce your knowledge.
You’ll start off with some simple components (tweets,dialog boxes,emails) and grow into more complex mini-apps. By the end you’ll have the skills to build that Slack clone you saw above,plus simplified versions of Trello,Hacker News,Pinterest,and Reddit.
Introduction
Hello World
JSX: What and Why
Working With JSX
Example: Tweet Component
Props
Example: Tweet With Props
Prop Types
Children
Example: GitHub File List
State in Classes
The Component Lifecycle
API Requests in React
State in Functions
Thinking About State
Input Controls
The useReducer Hook
The useEffect Hook
The Context APl
Example: Shopping Site
Where To Go From Here