Download WYSIWYG ®
Gender:
Longevity: 10 years
Posts: 1546
Fullstack React with TypeScript (Revision r10)
Год издания : 2021Автор : Ivanov Maksim, Bespoyasov AlexИздательство : /newlineЯзык : АнглийскийФормат : PDF/epubКачество : Издательский макет или текст (eBook)Интерактивное оглавление : ДаКоличество страниц : 571Описание : Revision r10 – 2021-03-03 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.
Оглавление Contents Book Revision . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Join Our Discord Channel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Bug Reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Be notified of updates via Twitter . . . . . . . . . . . . . . . . . . . . . . . . . 1 We’d love to hear from you! . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 How To Get The Most Out Of This Book . . . . . . . . . . . . . . . . . . . . 2 What is TypeScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Why Use TypeScript With React . . . . . . . . . . . . . . . . . . . . . . . . . 9 A Necessary Word Of Caution . . . . . . . . . . . . . . . . . . . . . . . . . . . 11Your First React and TypeScript Application: Building Trello with Drag and Drop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 What Are We Building? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Preview The Final Result . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 How to Bootstrap React + TypeScript App Automatically . . . . . . . . . . 17 App Layout. React + TypeScript Basics . . . . . . . . . . . . . . . . . . . . . . 31 Create The Card Component . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 Render Children Inside The Columns . . . . . . . . . . . . . . . . . . . . . . 50 Render Everything Together . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 Component For Adding New Items. State, Hooks, and Events . . . . . . . . 53 Add Global State And Business Logic . . . . . . . . . . . . . . . . . . . . . . 66 Using useReducer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 Implement State Management . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 Adding Items. TypeScript Interfaces Vs Types . . . . . . . . . . . . . . . . . 79 Moving Items . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90 Implement Custom Dragging Preview . . . . . . . . . . . . . . . . . . . . . . 105 Move The Dragged Item Preview . . . . . . . . . . . . . . . . . . . . . . . . . 112 Hide The Default Drag Preview . . . . . . . . . . . . . . . . . . . . . . . . . . 114 Drag Cards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116 Update CustomDragLayer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121 Update The Reducer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122 Drag a Card To an Empty Column . . . . . . . . . . . . . . . . . . . . . . . . 125 Saving State On Backend. How To Make Network Requests . . . . . . . . . 127 Loading The Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136How to Test Your Applications: Testing a Digital Goods Store . . . . . . . . 147 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147 Initial Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152 Writing Tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159 Home Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180 Testing React Hooks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215 Congratulations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226Patterns in React TypeScript Applications: Making Music with React . . . 227 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227 What We’re Going to Build . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227 What We’re Going to Use . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229 First Steps and Basic Application Layout . . . . . . . . . . . . . . . . . . . . 229 A Bit of a Music Theory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236 Third Party API and Browser API . . . . . . . . . . . . . . . . . . . . . . . . . 247 Patterns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251 Creating a Keyboard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253 Playing a Sound . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260 Mapping Real Keys to Virtual . . . . . . . . . . . . . . . . . . . . . . . . . . . 272 Instruments List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275 Render Props . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281 Higher Order Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310Using Redux and TypeScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311 What Are We Building? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311 Preview The Final Result . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312 What is Redux? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316 Why Can’t We Use useReducer Instead of Redux? . . . . . . . . . . . . . . . 319 Initial Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320 Prepare The Styles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325 Working With Canvas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325 Handling Canvas Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326 Define The Store Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327 Add Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329 Add The Reducer Logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331 Define The First Selector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333 Use The Selector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 334 Dispatch Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 334 Draw The Current Stroke . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 337 Implement Selecting Colors . . . . . . . . . . . . . . . . . . . . . . . . . . . . 340 Implement Undo and Redo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 344 Splitting Root Reducer And Using combineReducers . . . . . . . . . . . . . 348 Exporting An Image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357 Using Redux Toolkit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 361 Configuring The Store . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 362 Using createAction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 363 Using createReducer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365 Using Slices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 369 Remake The Imports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 374 Save And Load Data Using Thunks . . . . . . . . . . . . . . . . . . . . . . . . 376 Add Modal Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 377 Add The Modal Manager Component . . . . . . . . . . . . . . . . . . . . . . 379 Save The Project Using Thunks . . . . . . . . . . . . . . . . . . . . . . . . . . 383 Load The Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 386 Define The ProjectsList Module . . . . . . . . . . . . . . . . . . . . . . . . . . 388Static Site Generation and Server-Side Rendering Using Next.js . . . . . . . 395 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 395 What We’re Going to Build . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 395 Pre-Rendering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 398 Next.js . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 399 Setting Up a Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 399 Creating A First Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 401 Basic Application Layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 402 Center Component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 405 Footer Component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 406 Custom App Component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 406 Application Theme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 408 Custom Document Component . . . . . . . . . . . . . . . . . . . . . . . . . . 410 Site Front Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 415 Page 404 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 420 Post Page Template . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 421 Backend API Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 422 Frontend API Client . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 426 Updating The Main Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 427 Pre-Render Post Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 432 Category Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 437 Adding Breadcrumbs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 442 Comments and Server-Side Rendering . . . . . . . . . . . . . . . . . . . . . . 443 Add Comments to Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 446 API for Adding Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 449 Adding Comments on Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 450 Converting Statically Generated Page to Rendered on Server . . . . . . . . 453 Connecting Redux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 453 Building Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 462 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 463GraphQL, React, and TypeScript . . . . . . . . . . . . . . . . . . . . . . . . . . . 464 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 464 Is GraphQL Better Than REST? . . . . . . . . . . . . . . . . . . . . . . . . . . 467 What Are We Building? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 469 Preview The Final Result . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 473 Setting Up The Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 474 Running Typescript in The Console . . . . . . . . . . . . . . . . . . . . . . . . 474 Authenticating in GitHub . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 475 Initializing The Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . 479 Authentication Context . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 481 Authenticating The ApolloClient . . . . . . . . . . . . . . . . . . . . . . . . . 487 GraphQL Queries - Getting The User Data . . . . . . . . . . . . . . . . . . . 488 Add The Panel Component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 492 Define The WelcomeWindow Layout . . . . . . . . . . . . . . . . . . . . . . . 493 Getting GitHub GraphQL Schema . . . . . . . . . . . . . . . . . . . . . . . . 495 Generating The Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 496 Adding Navigation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 497 Working With GitHub Repositories . . . . . . . . . . . . . . . . . . . . . . . . 500 Define The List Component . . . . . . . . . . . . . . . . . . . . . . . . . . . . 504 Getting The Repositories List . . . . . . . . . . . . . . . . . . . . . . . . . . . . 505 Define Form Helper Components . . . . . . . . . . . . . . . . . . . . . . . . . 511 GraphQL Mutations - Creating The Repositories . . . . . . . . . . . . . . . . 515 Getting The Repository ID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 523 Working With GitHub Issues . . . . . . . . . . . . . . . . . . . . . . . . . . . . 524 Getting The List Of Issues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 528 Creating An Issue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 532 Working With Github Pull Requests . . . . . . . . . . . . . . . . . . . . . . . 540 Getting The Pull Requests List . . . . . . . . . . . . . . . . . . . . . . . . . . . 543 Creating A New Pull Request . . . . . . . . . . . . . . . . . . . . . . . . . . . 547 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 559 Appendix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 561 Changelog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 562 Revision r10 (03-03-2021) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 562 Revision r9 (26-02-2021) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 562 Revision r8 (17-02-2021) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 562 Revision r7 (01-12-2020) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 562 Revision r6 (01-12-2020) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 562 Revision r5 (10-11-2020) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 563 Revision r4 (26-08-2020) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 563 Revision 3p (07-30-2020) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 563 Revision 2p (06-08-2020) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 563 Revision 1p (05-20-2020) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 563
[only-soft.org].t135687.torrent
Torrent:
Registered [ 2021-03-09 15:15 ]
· D4D398A27C7A550D2A5F385AA49E96E249F99653
181 KB
Status:
√ checked
Completed:
13 times
Size:
78 MB
Rate:
(Vote: 0 )
Have thanked:
2 (List )
Ivanov Maksim, Bespoyasov Alex - Fullstack React with TypeScript (Revision r10) [2021, PDF/EPUB, ENG] + code download torrent for free and without registration