React and Typescript: Build a Portfolio Project
Course description
Kick off your learning experience with an introduction on how to use React and Typescript together. Not familiar with Typescript? No problem! A lightning fast - but comprehensive - tutorial is included!
Read more about the course
Once you're ready with React and Typescript, you'll dive into our big project. You are going to build an interactive browser-based coding environment. It's like a Jupyter Notebook, but for Javascript, with many additional features added in. Yes, this is what you are going to build in this course! You will solve incredible challenges around bundling and transpiling code directly in the browser. This is a task normally done by running Webpack and Babel at your terminal! You will execute users' code safely in the browser just like how famous services like CodeSandBox and CodePen do. Finally, you'll deploy this project using a multi-package architecture to NPM, where your friends and employers can easily download and run your project.
During this entire project, I will show you a variety of different solutions to an incredible number of problems. I will show you step-by-step how to solve each problem. You will also see many concerns around performance and security addressed.
At the end of the course, you will have an amazing portfolio project with excellent looks and functionality. You will understand every line of code, and be able to explain every bit to potential employers.
Here's a partial list of the topics that will be covered in this course:
- Master the use of React, Redux, and Typescript together
- Build a complex and interesting app using a package-based architecture
- Understand the challenges of in-browser code transpiling and and processing
- Secure your app against potential security exploits
- Safely execute user-provided code directly in the browser
- Run a code editor directly in the browser - the same editor used by VSCode!
- Leverage Web Assembly to run a code bundler directly in the browser at lightning-fast speeds
- Use the internals of Redux to manually test out your business logic
- Discover dozens of tricks to build a sleek UI
- Deploy your app to the NPM registry, where others can easily use it
- I built this course to help you apply your React skills. Sign up today and build an incredible app that will prove your knowledge.
Watch Online
| # | Lesson Title | Duration |
|---|---|---|
| 1 | How to Get Help | 00:56 |
| 2 | Be Sure to Watch this Video! | 01:40 |
| 3 | Generating TypeScript-Enabled Projects | 01:35 |
| 4 | File Extensions and Starting Up React | 04:35 |
| 5 | Changes with TypeScript | 02:34 |
| 6 | The Big Difference with Props | 03:54 |
| 7 | Explicit Component Type Annotations | 05:51 |
| 8 | Annotations with Children | 05:48 |
| 9 | State with TypeScript | 04:42 |
| 10 | Type Inference with State | 05:42 |
| 11 | Quick Finish to the Example | 00:56 |
| 12 | More on State | 04:20 |
| 13 | Type Unions in State | 05:42 |
| 14 | Inline Event Handlers | 03:19 |
| 15 | Typing Standalone Event Handlers | 02:41 |
| 16 | Handling Drag Events Too! | 03:45 |
| 17 | TypeScript with Class Components | 09:04 |
| 18 | Applying Types to Refs | 05:36 |
| 19 | More on Refs | 04:31 |
| 20 | App Overview | 02:05 |
| 21 | Project Setup | 01:50 |
| 22 | Redux Store Design | 08:54 |
| 23 | Reducer Setup | 08:17 |
| 24 | Annotating the Return Type | 01:27 |
| 25 | Typing an Action | 01:55 |
| 26 | Separate Interfaces for Actions | 04:22 |
| 27 | Applying Action Interfaces | 04:23 |
| 28 | Adding an Action Type Enum | 05:42 |
| 29 | A Better Way to Organize Code | 03:38 |
| 30 | Adding Action Creators | 04:28 |
| 31 | Adding Request Logic | 03:16 |
| 32 | Applying Typings to Dispatch | 02:47 |
| 33 | Setting Up Exports | 04:20 |
| 34 | Wiring Up to React | 03:25 |
| 35 | Oops... Initial State! | 01:04 |
| 36 | Reminder on Event Types | 03:01 |
| 37 | Calling an Action Creator | 03:06 |
| 38 | Binding Action Creators | 04:22 |
| 39 | Selecting State | 04:17 |
| 40 | Awkward Typings Around React-Redux | 04:47 |
| 41 | Creating a Typed Selector | 04:01 |
| 42 | Consuming Store State | 03:03 |
| 43 | Quick Wrapup | 03:25 |
| 44 | App Overview | 06:16 |
| 45 | Three Big Challenges | 06:03 |
| 46 | Transpiling Options | 06:09 |
| 47 | Remote Transpiling | 02:58 |
| 48 | Module Systems | 04:31 |
| 49 | Behind the Scenes with Webpack | 07:10 |
| 50 | Webpack with ES Modules | 02:41 |
| 51 | One Small Change | 02:42 |
| 52 | Options for Bundling | 06:50 |
| 53 | So Which Approach? | 04:02 |
| 54 | A Webpack Replacement | 02:49 |
| 55 | A Demo App | 01:07 |
| 56 | Project Setup | 02:55 |
| 57 | Basic Form Elements | 04:55 |
| 58 | Understanding ESBuild | 06:08 |
| 59 | Initializing ESBuild | 03:41 |
| 60 | Using Refs for Arbitrary Values | 03:11 |
| 61 | Transpiling Works! | 04:43 |
| 62 | Troubles with Bundling in the Browser | 05:57 |
| 63 | Issues with NPM | 04:56 |
| 64 | Solution with Unpkg | 04:33 |
| 65 | ESBuild Can Bundle! | 05:22 |
| 66 | Deep Dive on Bundling | 10:50 |
| 67 | Filters and Namespaces | 03:01 |
| 68 | Adding a Tiny Test Package | 02:31 |
| 69 | Dynamically Fetching Modules | 08:24 |
| 70 | Generating the Unpkg URL | 02:00 |
| 71 | Issues with Multi-File Packages | 04:21 |
| 72 | Solving Relative Paths | 06:43 |
| 73 | Using the URL Constructor | 03:58 |
| 74 | Failing Nested Requires | 10:41 |
| 75 | Resolving Nested Paths | 07:50 |
| 76 | It Works! | 05:48 |
| 77 | Defines During Bundling | 05:59 |
| 78 | Bonus! Package Versioning | 02:47 |
| 79 | Crazy Numbers of Requests | 03:12 |
| 80 | Implementing a Caching Layer | 03:56 |
| 81 | Caching with Key-Value Pairs | 06:32 |
| 82 | Fixing a TypeScript Error | 06:05 |
| 83 | Bundling User Input | 04:36 |
| 84 | Breaking Up Resolve Logic With Filters | 06:26 |
| 85 | Refactoring to Multiple Plugins | 05:45 |
| 86 | Loading CSS Files | 01:51 |
| 87 | Configuring the Correct Loader | 04:17 |
| 88 | Small Shortcoming with ESBuild | 02:40 |
| 89 | Tricking ESBuild's CSS Handling | 05:59 |
| 90 | Escaping CSS Snippets | 05:11 |
| 91 | Separate Load Filters | 05:35 |
| 92 | Extracting Common Caching Logic | 04:19 |
| 93 | A Better Way of Loading WASM | 03:27 |
| 94 | Executing User Code | 06:08 |
| 95 | Big Issues with Code Execution | 06:47 |
| 96 | How Do Others Solve This? | 01:44 |
| 97 | Displaying IFrames | 02:54 |
| 98 | Different Execution Context | 02:50 |
| 99 | Crossing Context | 03:19 |
| 100 | Sandboxing an IFrame | 03:42 |
| 101 | Breaking Access with Different Domains | 04:12 |
| 102 | How Do IFrames Fix Anything? | 03:25 |
| 103 | The Full Flow - How CodePen and CodeSandbox Work | 04:37 |
| 104 | Do We Need Separation? | 04:30 |
| 105 | Middle Ground Approach | 07:21 |
| 106 | IFrames with SrcDocs | 07:50 |
| 107 | Execution Using SrcDoc | 04:26 |
| 108 | Running Unescaped Code | 09:46 |
| 109 | Indirect Communication Between Frames | 05:40 |
| 110 | Passing Code to the IFrame | 07:04 |
| 111 | It Works! | 03:00 |
| 112 | Highlighting Errors | 06:29 |
| 113 | Issues with Repeat Execution | 03:09 |
| 114 | Resetting the IFrame Contents | 03:50 |
| 115 | Warning Fixup | 00:52 |
| 116 | Issues with Eager Bundling | 05:59 |
| 117 | Quick Revert | 00:45 |
| 118 | Open Source Editor Options | 02:43 |
| 119 | Displaying an Editor | 05:55 |
| 120 | Configuring the Editor | 03:51 |
| 121 | Crazy Monaco Editor Type Defs | 08:45 |
| 122 | A Few More Options | 04:21 |
| 123 | Setting the Initial Value | 03:43 |
| 124 | Handling Editor Change Events | 05:51 |
| 125 | Adding a Type Definition | 04:00 |
| 126 | Adding Prettier to Our Editor | 04:03 |
| 127 | Automatic Code Formatting | 05:52 |
| 128 | Adding a CSS Library | 03:19 |
| 129 | Floating the Format Button | 05:24 |
| 130 | Fixing Syntax Highlighting | 16:10 |
| 131 | Refactoring Out a Preview Component | 08:16 |
| 132 | Extracting Bundling Logic | 08:05 |
| 133 | Fixing a Few Warnings | 03:24 |
| 134 | Multiple Editors and Preview Windows | 05:22 |
| 135 | Adding Resizable Panes | 03:18 |
| 136 | Setting Up React-Resizable | 05:44 |
| 137 | Setting a Resize Handle | 05:42 |
| 138 | Adding a Bunch of CSS | 01:38 |
| 139 | Expanding the Resizer Horizontally | 04:28 |
| 140 | Expanding the Code Editor | 04:43 |
| 141 | Fixing the Resize Issue | 05:40 |
| 142 | Constraining Vertical Resizes | 03:32 |
| 143 | Resizing Horizontally | 01:59 |
| 144 | Strategies for Prop Definitions | 04:35 |
| 145 | Applying Horizontal Resize Props | 03:46 |
| 146 | Getting Preview to Expand | 05:24 |
| 147 | A Small Workaround | 01:46 |
| 148 | Updating the After Selector | 01:06 |
| 149 | An Oddity Around the Resizer | 00:47 |
| 150 | On Resize Events | 03:20 |
| 151 | Updating Resizer Props | 04:29 |
| 152 | Improving Resize Performance | 02:15 |
| 153 | Why Width Jumps? | 03:28 |
| 154 | Synchronizing Width State | 07:20 |
| 155 | Adding Debouncing Logic | 04:47 |
| 156 | Clearing the Timeout | 02:30 |
| 157 | Adding an Execution Timeout | 03:18 |
| 158 | Error Handling | 01:31 |
| 159 | Extracting Reusable Error Handling Logic | 03:03 |
| 160 | Handling Async Errors | 04:38 |
| 161 | Capturing Bundling Errors | 04:03 |
| 162 | Printing the Captured Error | 05:01 |
| 163 | Plan for the Text Cell | 03:45 |
| 164 | A Few Issues with the Markdown Editor | 05:40 |
| 165 | Toggling the Markdown Editor Mode | 05:26 |
| 166 | Conditional Toggling | 05:27 |
| 167 | Why the Broken Cursor? | 02:49 |
| 168 | Solving Class Name Conflicts | 02:49 |
| 169 | Fixing the Divider Height | 01:43 |
| 170 | Restyling the Resizer Bar | 04:49 |
| 171 | Applying the Dark Theme | 00:51 |
| 172 | Adding State to the Editor | 02:39 |
| 173 | Last Touch of Styling | 01:13 |
| 174 | Redux Design | 04:55 |
| 175 | Initial Scaffolding | 04:56 |
| 176 | Action Interface Definitions | 07:32 |
| 177 | Defining What a Cell Is | 04:09 |
| 178 | Cells Reducer Setup | 05:49 |
| 179 | Adding a Few Reducer Cases | 02:22 |
| 180 | Creating and Exporting the Store | 03:16 |
| 181 | React to Redux Connection | 02:00 |
| 182 | Action Creator Return Type Annotations | 05:14 |
| 183 | Easy Action Creator Implementations | 05:43 |
| 184 | Handling Cyclical Imports | 03:47 |
| 185 | Defining Direction | 01:14 |
| 186 | Update Cell Logic | 06:17 |
| 187 | Simple Updates with Immer | 07:11 |
| 188 | Removing a Cell | 03:37 |
| 189 | Swapping Cell Placement | 06:34 |
| 190 | Inserting New Cells | 09:46 |
| 191 | Small Gotcha with Immer | 05:50 |
| 192 | Manual Testing of a Redux Store | 06:27 |
| 193 | Back to React | 03:50 |
| 194 | Creating a Typed Selector | 03:15 |
| 195 | Selecting an Ordered List | 02:45 |
| 196 | Rendering the List of Cells | 03:44 |
| 197 | Cell Type Rendering | 04:06 |
| 198 | Reminder on the Action Creator Helper | 05:09 |
| 199 | Extracting Local State | 07:44 |
| 200 | Extracting State from Text Cell | 07:07 |
| 201 | The Action Bar Component | 06:51 |
| 202 | Adding Icon Buttons | 07:03 |
| 203 | Applying Custom CSS | 04:46 |
| 204 | Last Touch of Styling | 06:35 |
| 205 | Adding New Cells | 05:13 |
| 206 | Displaying Add Cell | 04:30 |
| 207 | Resolving the Key Warning | 01:02 |
| 208 | Styling Add Cell | 03:32 |
| 209 | A Touch More Styling | 07:25 |
| 210 | Forcing Add Cell Visibility | 07:16 |
| 211 | Understanding CSS Transition Curves | 05:15 |
| 212 | Adding Vertical Spacing | 03:35 |
| 213 | Why is Add Cell Weird | 04:45 |
| 214 | Three Possible Solutions | 10:59 |
| 215 | Refactoring the Redux Side | 05:44 |
| 216 | Refactoring the React Side | 04:35 |
| 217 | Should There Be a Bundles Reducer? | 09:21 |
| 218 | Here's the Plan | 02:55 |
| 219 | Defining Bundling Action Types | 03:44 |
| 220 | Initial Reducer Implementation | 04:29 |
| 221 | Finishing Up the Reducer | 02:48 |
| 222 | Adding the Action Creator | 07:00 |
| 223 | React Wire Up | 08:03 |
| 224 | Adjusting the Reducer State | 04:50 |
| 225 | Solving a Small Warning with useMemo | 07:32 |
| 226 | Adding Eager Bundling | 05:32 |
| 227 | Getting an Initial Bundle | 03:23 |
| 228 | Showing a Loading Message | 03:21 |
| 229 | Styling the Progress Bar | 04:34 |
| 230 | Can We Estimate Bundle Duration? | 03:55 |
| 231 | Fading In the Progress Bar | 07:18 |
| 232 | Fixing the Background | 05:59 |
| 233 | Referencing Code from Previous Cells | 04:15 |
| 234 | Method of Implementation | 03:52 |
| 235 | Calculating Cumulative Code | 05:44 |
| 236 | Executing the Cumulative Code | 02:59 |
| 237 | Adding a Show Function | 04:44 |
| 238 | Showing Complex Values | 02:44 |
| 239 | Showing a JSX Element | 04:53 |
| 240 | Import Name Collisions | 02:30 |
| 241 | Avoiding Naming Collisions | 04:32 |
| 242 | Showing a React Component | 02:57 |
| 243 | Selective Calls to Show | 02:46 |
| 244 | Implementing a Show Function No-Op | 03:56 |
| 245 | Extracting a Hook | 04:09 |
| 246 | A Touch of CSS | 01:50 |
| 247 | Fixing Edge Snaps | 03:01 |
| 248 | The Path Moving Forward | 03:19 |
| 249 | Planning Local Architecture | 05:16 |
| 250 | An Easy Solution | 05:00 |
| 251 | What's the App Look Like in the Future? | 10:32 |
| 252 | Package Based Development | 08:13 |
| 253 | Introducing Lerna | 05:29 |
| 254 | Disclaimer on Lerna | 01:51 |
| 255 | Lerna Setup | 02:47 |
| 256 | Adding Modules with Lerna | 08:24 |
| 257 | Linking Packages | 06:11 |
| 258 | Adding TypeScript Support | 08:07 |
| 259 | Adding TypeScript to the CLI | 02:18 |
| 260 | Finishing TS Support | 02:18 |
| 261 | Parallel Start Scripts | 04:07 |
| 262 | Reading Command Line Arguments | 07:43 |
| 263 | Using Commander to Build a CLI | 07:43 |
| 264 | Specifying Command Line Options | 05:57 |
| 265 | Communication from the CLI to the API | 07:50 |
| 266 | What's that Directory Argument? | 03:00 |
| 267 | Calculating File Paths | 05:31 |
| 268 | The Local API | 03:14 |
| 269 | Adding Dependencies and Running Express | 04:23 |
| 270 | Error Handling Where? | 04:27 |
| 271 | Wrapping Express Listen with a Promise | 04:24 |
| 272 | Error Handling Solution | 04:29 |
| 273 | Accessing the React App | 02:48 |
| 274 | Connecting the Proxy | 04:59 |
| 275 | Building a Production Bundle | 02:36 |
| 276 | Understanding Package Links | 12:09 |
| 277 | What's the Path | 06:07 |
| 278 | Which Method Do We Use? | 03:15 |
| 279 | Determining Our Execution Environment | 05:03 |
| 280 | A Quick Test | 02:00 |
| 281 | Creating the Cells Router | 06:06 |
| 282 | Writing Cells to a File | 04:44 |
| 283 | Reading File Contents | 03:13 |
| 284 | Default Cell Values | 01:28 |
| 285 | Adding a JSON Parser | 00:47 |
| 286 | Adding Fetch Cell Logic to Redux | 06:25 |
| 287 | The Fetch Cells Action Creator | 03:50 |
| 288 | Handling Fetch Cell Types | 04:47 |
| 289 | Saving a List of Cells | 07:47 |
| 290 | When to Call Fetch? | 05:15 |
| 291 | Saving a List of Cells | 02:50 |
| 292 | Adding a Persist Middleware | 06:31 |
| 293 | Detecting When to Save | 05:51 |
| 294 | Debouncing Save Logic | 02:14 |
| 295 | The Path to NPM Publishing | 02:26 |
| 296 | Bootstrapping the Project | 03:51 |
| 297 | A Touch More Setup | 02:15 |
| 298 | Getting Ready to Publish | 04:59 |
| 299 | Configuring the CLI | 03:54 |
| 300 | Publishing to NPM | 01:58 |
| 301 | NPM Organizations | 04:43 |
| 302 | Declaring Scoped Packages | 03:03 |
| 303 | Refactoring Package Names | 04:21 |
| 304 | Auditing Dev Dependencies | 06:28 |
| 305 | Adding Build Scripts | 03:55 |
| 306 | The Case for Bundling | 04:03 |
| 307 | Running ESBuild | 06:00 |
| 308 | Creating a Repository | 01:52 |
| 309 | Publishing with Lerna | 01:06 |
| 310 | Does it Work? | 01:49 |
| 311 | Next Steps | 04:45 |
| 312 | TypeScript Overview | 06:20 |
| 313 | Environment Setup | 08:00 |
| 314 | A First App | 04:44 |
| 315 | Executing TypeScript Code | 05:04 |
| 316 | One Quick Change | 03:36 |
| 317 | Catching Errors with TypeScript | 07:23 |
| 318 | Catching More Errors! | 05:16 |
| 319 | Course Overview | 03:37 |
| 320 | Types | 05:13 |
| 321 | More on Types | 05:54 |
| 322 | Examples of Types | 04:50 |
| 323 | Where Do We Use Types? | 00:50 |
| 324 | Type Annotations and Inference | 02:04 |
| 325 | Annotations with Variables | 04:54 |
| 326 | Object Literal Annotations | 06:54 |
| 327 | Annotations Around Functions | 05:57 |
| 328 | Understanding Inference | 03:52 |
| 329 | The Any Type | 07:48 |
| 330 | Fixing the "Any" Type | 01:50 |
| 331 | Delayed Initialization | 03:06 |
| 332 | When Inference Doesn't Work | 04:38 |
| 333 | More on Annotations Around Functions | 04:57 |
| 334 | Inference Around Functions | 06:09 |
| 335 | Annotations for Anonymous Functions | 01:43 |
| 336 | Void and Never | 02:50 |
| 337 | Destructuring with Annotations | 03:36 |
| 338 | Annotations Around Objects | 07:06 |
| 339 | Arrays in TypeScript | 05:06 |
| 340 | Why Typed Arrays? | 04:31 |
| 341 | Multiple Types in Arrays | 02:58 |
| 342 | When to Use Typed Arrays | 00:55 |
| 343 | Tuples in TypeScript | 04:06 |
| 344 | Tuples in Action | 05:29 |
| 345 | Why Tuples? | 03:21 |
| 346 | Interfaces | 01:27 |
| 347 | Long Type Annotations | 04:43 |
| 348 | Fixing Annotations with Interfaces | 04:37 |
| 349 | Syntax Around Interfaces | 03:32 |
| 350 | Functions In Interfaces | 04:47 |
| 351 | Code Reuse with Interfaces | 04:16 |
| 352 | General Plan with Interfaces | 03:13 |
| 353 | Classes | 03:48 |
| 354 | Basic Inheritance | 03:04 |
| 355 | Class Method Modifiers | 06:42 |
| 356 | Fields in Classes | 06:19 |
| 357 | Fields with Inheritance | 04:19 |
| 358 | Where to Use Classes | 01:11 |
| 359 | App Overview | 02:46 |
| 360 | Bundling with Parcel | 04:55 |
| 361 | Project Structure | 03:20 |
| 362 | Generating Random Data | 05:30 |
| 363 | Type Definition Files | 05:18 |
| 364 | Using Type Definition Files | 06:21 |
| 365 | Export Statements in TypeScript | 05:07 |
| 366 | Defining a Company | 04:44 |
| 367 | Adding Google Maps Support | 07:39 |
| 368 | Google Maps Integration with TypeScript | 04:07 |
| 369 | Exploring Type Definition Files | 12:47 |
| 370 | Hiding Functionality | 06:29 |
| 371 | Why Use Private Modifiers? Here's Why | 08:26 |
| 372 | Adding Markers | 09:19 |
| 373 | Duplicate Code | 02:46 |
| 374 | One Possible Solution | 06:39 |
| 375 | Restricting Access with Interfaces | 05:36 |
| 376 | Implicit Type Checks | 03:27 |
| 377 | Showing Popup Windows | 06:48 |
| 378 | Updating Interface Definitions | 07:12 |
| 379 | Optional Implements Clauses | 06:07 |
| 380 | App Wrapup | 08:09 |
Comments
0 commentsWant to join the conversation?
Sign in to commentSimilar courses
React and NodeJS: A Practical Guide with Typescript
FULL Authentication WITH REACT JS NEXT JS TYPESCRIPT
Course: Large Scale Apps with Vue, Vite and TypeScript
Web Security Dev Academy - 12-week online program