Fullstack.io, 2021. — 571 p.
Revision r11 (26-03-2021)• Updated the react-dnd package in the first chapter
• Introduced Immer for state management in the first chapter
• Fixed typos and missing links
• Replaced interfaces with types
• Added a section about optimizing images in the fifth chapterFullstack React with TypeScript - это практическое руководство, которое поможет вам (и вашей команде) в кратчайшие сроки писать приложения React с TypeScript (и хуками).
Вы можете думать о TypeScript как о чем-то, что применимо только к Angular - в конце концов, именно Angular впервые применил TypeScript для веб-разработки.
Но внедрение TypeScript с React резко возросло в прошлом году - и не зря. React и TypeScript - мощная комбинация, которая может предотвратить ошибки и помочь вам (и вашей команде) быстрее выпускать продукты.
В этом году я перевел всю свою новую разработку React на TypeScript. Хотя проверка типов - это немного больше работы вначале, это огромная помощь для повышения производительности в ходе проекта - особенно потому, что теперь ваш редактор может помочь вам писать код.
Welcome to Fullstack React with TypeScript! React and TypeScript are a powerful combination that can prevent bugs and help you (and your team) ship products faster. But understanding idiomatic React patterns and getting the typings setup isn’t always straightforward.
This practical, hands-on book is a guide that will have you (and your team) writing React apps with TypeScript (and hooks) in no time.
This book consists of several sections. Each section covers one practical case of using Typescript with React.
Your First React and Typescript Application: Building Trello with Drag and Drop: There you will learn how to bootstrap a React Typescript application and all the basics of using React with Typescript. We will build a kanban board application like Trello that will store it’s state on backend.
Testing React With TypeScript: Testing a Digital-Goods Store:. In this section you will set up your testing environment and learn how to test your application. We will take an online store application and cover it with tests.
Patterns in React Typescript Applications: Making Music with React: Making Music with React. Here we cover Higher Order Components (HOCs) and render props React patterns. We show when are they useful and how to use them with Typescript. In this section we will build a virtual piano that supports different sound sets.
Next.js and Static Site Generation: Building a Medium-like Blog Building Medium with SSG. React can be rendered server-side. It allows to create multi-page interactive websites. In this section we cover the basics of server-side generation with React and then we build an advanced application using NextJS framework. The example application will be blogging platform (like Medium).
State Management With Redux and Typescript. (coming soon – Summer 2020) Some React applications are so complex that they require using some external state management library. Redux is a solid choice in this case. It is worth learning how to use it with Typescript. In this section we will build a drawing application with undo/redo support. It will also let you save your drawings on backend.
VI GraphQL With React And Typescript. (coming soon – Summer 2020) GraphQL is a query language that allows to create flexible APIs. Facebook, Github, Twitter and a lot of other companies provide GraphQL APIs. Typescript works pretty well with GraphQL. In this section we will build a Github issue viewer.