http://www.loc.gov/mods/v3 http://www.loc.gov/standards/mods/v3/mods-3-2.xsd
a beginner's guide to reactive web development with React 18 and TypeScript
1 online resource (474 pages) : illustrations
Reading, navigating, and debugging a large frontend codebase is a major issue faced by frontend developers. This book is designed to help web developers like you learn about ReactJS and TypeScript, both of which power large-scale apps for many organizations. This second edition of Learn React with TypeScript is updated, enhanced, and improved to cover new features of React 18 including hooks, state management libraries, and features of TypeScript 4. The book will enable you to create well-structured and reusable React components that are easy to read and maintain, leveraging modern design patterns. You'll be able to ensure that all your components are type-safe, making the most of TypeScript features, including some advanced types. You'll also learn how to manage complex states using Redux and how to interact with a GraphQL web API. Finally, you'll discover how to write robust unit tests for React components using Jest. By the end of the book, you'll be well-equipped to use both React and TypeScript.
Intro -- Preface -- Part 1: Introduction -- Chapter 1: Introducing React -- Technical requirements -- Understanding the benefits of React -- Understanding JSX -- Creating a component -- Creating a CodeSandbox project -- Understanding the React entry point -- Understanding the React component tree -- Creating a basic alert component -- Understanding imports and exports -- Understanding the importance of modules -- Using export statements -- Using import statements -- Adding Alert to the App component -- Using props -- Understanding props -- Adding props to the alert component -- Using state
Understanding state -- Implementing a visible state in the alert component -- Adding a close button to Alert -- Using events -- Understanding events -- Implementing a close button click handler in the alert -- Implementing an alert close event -- Summary -- Questions -- Answers -- Chapter 2: Introducing TypeScript -- Technical requirements -- Understanding the benefits of TypeScript -- Understanding TypeScript -- Catching type errors early -- Improving developer experience and productivity with IntelliSense -- Understanding JavaScript types -- Using basic TypeScript types
Using type annotations -- Using type inference -- Using the Date type -- Using the any type -- Using the unknown type -- Using the void type -- Using the never type -- Using arrays -- Creating TypeScript types -- Using object types -- Creating type aliases -- Creating interfaces -- Creating classes -- Creating enumerations -- Creating union types -- Using the TypeScript compiler -- Summary -- Questions -- Answers -- Chapter 3: Setting Up React and TypeScript -- Technical requirements -- Creating a project with webpack -- Introducing webpack -- Creating the folder structure
Creating package.json -- Adding a web page -- Adding TypeScript -- Adding React -- Adding Babel -- Adding webpack -- Creating a project with Create React App -- Using Create React App -- Adding linting to Visual Studio Code -- Adding code formatting -- Starting the app in development mode -- Producing a production build -- Creating a React and TypeScript component -- Adding a props type -- Adding a state type -- Using React DevTools -- Summary -- Questions -- Answers -- Chapter 4: Using React Hooks -- Technical requirements -- Using the effect Hook -- Understanding the effect Hook parameters
The rules of Hooks -- Effect cleanup -- Creating the project -- Fetching data using the effect Hook -- Using state Hooks -- Using useState -- Understanding useReducer -- Using useReducer -- Using the ref Hook -- Understanding the ref Hook -- Using the ref Hook -- Using the memo Hook -- Understanding the memo Hook -- Using the memo Hook -- Using the callback Hook -- Understanding the callback Hook -- Understanding when a component is re-rendered -- Using the callback Hook -- Summary -- Questions -- Answers -- Part 2: App Fundamentals -- Chapter 5: Approaches to Styling React Frontends
Birmingham : Packt Publishing, Limited,c2023