Skip to main content

React and Typescript: Build a Portfolio Project

29h 21m 48s
English
Free

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

0:00 0:00
#Lesson TitleDuration
1How to Get Help00:56
2Be Sure to Watch this Video!01:40
3Generating TypeScript-Enabled Projects01:35
4File Extensions and Starting Up React04:35
5Changes with TypeScript02:34
6The Big Difference with Props03:54
7Explicit Component Type Annotations05:51
8Annotations with Children05:48
9State with TypeScript04:42
10Type Inference with State05:42
11Quick Finish to the Example00:56
12More on State04:20
13Type Unions in State05:42
14Inline Event Handlers03:19
15Typing Standalone Event Handlers02:41
16Handling Drag Events Too!03:45
17TypeScript with Class Components09:04
18Applying Types to Refs05:36
19More on Refs04:31
20App Overview02:05
21Project Setup01:50
22Redux Store Design08:54
23Reducer Setup08:17
24Annotating the Return Type01:27
25Typing an Action01:55
26Separate Interfaces for Actions04:22
27Applying Action Interfaces04:23
28Adding an Action Type Enum05:42
29A Better Way to Organize Code03:38
30Adding Action Creators04:28
31Adding Request Logic03:16
32Applying Typings to Dispatch02:47
33Setting Up Exports04:20
34Wiring Up to React03:25
35Oops... Initial State!01:04
36Reminder on Event Types03:01
37Calling an Action Creator03:06
38Binding Action Creators04:22
39Selecting State04:17
40Awkward Typings Around React-Redux04:47
41Creating a Typed Selector04:01
42Consuming Store State03:03
43Quick Wrapup03:25
44App Overview06:16
45Three Big Challenges06:03
46Transpiling Options06:09
47Remote Transpiling02:58
48Module Systems04:31
49Behind the Scenes with Webpack07:10
50Webpack with ES Modules02:41
51One Small Change02:42
52Options for Bundling06:50
53So Which Approach?04:02
54A Webpack Replacement02:49
55A Demo App01:07
56Project Setup02:55
57Basic Form Elements04:55
58Understanding ESBuild06:08
59Initializing ESBuild03:41
60Using Refs for Arbitrary Values03:11
61Transpiling Works!04:43
62Troubles with Bundling in the Browser05:57
63Issues with NPM04:56
64Solution with Unpkg04:33
65ESBuild Can Bundle!05:22
66Deep Dive on Bundling10:50
67Filters and Namespaces03:01
68Adding a Tiny Test Package02:31
69Dynamically Fetching Modules08:24
70Generating the Unpkg URL02:00
71Issues with Multi-File Packages04:21
72Solving Relative Paths06:43
73Using the URL Constructor03:58
74Failing Nested Requires10:41
75Resolving Nested Paths07:50
76It Works!05:48
77Defines During Bundling05:59
78Bonus! Package Versioning02:47
79Crazy Numbers of Requests03:12
80Implementing a Caching Layer03:56
81Caching with Key-Value Pairs06:32
82Fixing a TypeScript Error06:05
83Bundling User Input04:36
84Breaking Up Resolve Logic With Filters06:26
85Refactoring to Multiple Plugins05:45
86Loading CSS Files01:51
87Configuring the Correct Loader04:17
88Small Shortcoming with ESBuild02:40
89Tricking ESBuild's CSS Handling05:59
90Escaping CSS Snippets05:11
91Separate Load Filters05:35
92Extracting Common Caching Logic04:19
93A Better Way of Loading WASM03:27
94Executing User Code06:08
95Big Issues with Code Execution06:47
96How Do Others Solve This?01:44
97Displaying IFrames02:54
98Different Execution Context02:50
99Crossing Context03:19
100Sandboxing an IFrame03:42
101Breaking Access with Different Domains04:12
102How Do IFrames Fix Anything?03:25
103The Full Flow - How CodePen and CodeSandbox Work04:37
104Do We Need Separation?04:30
105Middle Ground Approach07:21
106IFrames with SrcDocs07:50
107Execution Using SrcDoc04:26
108Running Unescaped Code09:46
109Indirect Communication Between Frames05:40
110Passing Code to the IFrame07:04
111It Works!03:00
112Highlighting Errors06:29
113Issues with Repeat Execution03:09
114Resetting the IFrame Contents03:50
115Warning Fixup00:52
116Issues with Eager Bundling05:59
117Quick Revert00:45
118Open Source Editor Options02:43
119Displaying an Editor05:55
120Configuring the Editor03:51
121Crazy Monaco Editor Type Defs08:45
122A Few More Options04:21
123Setting the Initial Value03:43
124Handling Editor Change Events05:51
125Adding a Type Definition04:00
126Adding Prettier to Our Editor04:03
127Automatic Code Formatting05:52
128Adding a CSS Library03:19
129Floating the Format Button05:24
130Fixing Syntax Highlighting16:10
131Refactoring Out a Preview Component08:16
132Extracting Bundling Logic08:05
133Fixing a Few Warnings03:24
134Multiple Editors and Preview Windows05:22
135Adding Resizable Panes03:18
136Setting Up React-Resizable05:44
137Setting a Resize Handle05:42
138Adding a Bunch of CSS01:38
139Expanding the Resizer Horizontally04:28
140Expanding the Code Editor04:43
141Fixing the Resize Issue05:40
142Constraining Vertical Resizes03:32
143Resizing Horizontally01:59
144Strategies for Prop Definitions04:35
145Applying Horizontal Resize Props03:46
146Getting Preview to Expand05:24
147A Small Workaround01:46
148Updating the After Selector01:06
149An Oddity Around the Resizer00:47
150On Resize Events03:20
151Updating Resizer Props04:29
152Improving Resize Performance02:15
153Why Width Jumps?03:28
154Synchronizing Width State07:20
155Adding Debouncing Logic04:47
156Clearing the Timeout02:30
157Adding an Execution Timeout03:18
158Error Handling01:31
159Extracting Reusable Error Handling Logic03:03
160Handling Async Errors04:38
161Capturing Bundling Errors04:03
162Printing the Captured Error05:01
163Plan for the Text Cell03:45
164A Few Issues with the Markdown Editor05:40
165Toggling the Markdown Editor Mode05:26
166Conditional Toggling05:27
167Why the Broken Cursor?02:49
168Solving Class Name Conflicts02:49
169Fixing the Divider Height01:43
170Restyling the Resizer Bar04:49
171Applying the Dark Theme00:51
172Adding State to the Editor02:39
173Last Touch of Styling01:13
174Redux Design04:55
175Initial Scaffolding04:56
176Action Interface Definitions07:32
177Defining What a Cell Is04:09
178Cells Reducer Setup05:49
179Adding a Few Reducer Cases02:22
180Creating and Exporting the Store03:16
181React to Redux Connection02:00
182Action Creator Return Type Annotations05:14
183Easy Action Creator Implementations05:43
184Handling Cyclical Imports03:47
185Defining Direction01:14
186Update Cell Logic06:17
187Simple Updates with Immer07:11
188Removing a Cell03:37
189Swapping Cell Placement06:34
190Inserting New Cells09:46
191Small Gotcha with Immer05:50
192Manual Testing of a Redux Store06:27
193Back to React03:50
194Creating a Typed Selector03:15
195Selecting an Ordered List02:45
196Rendering the List of Cells03:44
197Cell Type Rendering04:06
198Reminder on the Action Creator Helper05:09
199Extracting Local State07:44
200Extracting State from Text Cell07:07
201The Action Bar Component06:51
202Adding Icon Buttons07:03
203Applying Custom CSS04:46
204Last Touch of Styling06:35
205Adding New Cells05:13
206Displaying Add Cell04:30
207Resolving the Key Warning01:02
208Styling Add Cell03:32
209A Touch More Styling07:25
210Forcing Add Cell Visibility07:16
211Understanding CSS Transition Curves05:15
212Adding Vertical Spacing03:35
213Why is Add Cell Weird04:45
214Three Possible Solutions10:59
215Refactoring the Redux Side05:44
216Refactoring the React Side04:35
217Should There Be a Bundles Reducer?09:21
218Here's the Plan02:55
219Defining Bundling Action Types03:44
220Initial Reducer Implementation04:29
221Finishing Up the Reducer02:48
222Adding the Action Creator07:00
223React Wire Up08:03
224Adjusting the Reducer State04:50
225Solving a Small Warning with useMemo07:32
226Adding Eager Bundling05:32
227Getting an Initial Bundle03:23
228Showing a Loading Message03:21
229Styling the Progress Bar04:34
230Can We Estimate Bundle Duration?03:55
231Fading In the Progress Bar07:18
232Fixing the Background05:59
233Referencing Code from Previous Cells04:15
234Method of Implementation03:52
235Calculating Cumulative Code05:44
236Executing the Cumulative Code02:59
237Adding a Show Function04:44
238Showing Complex Values02:44
239Showing a JSX Element04:53
240Import Name Collisions02:30
241Avoiding Naming Collisions04:32
242Showing a React Component02:57
243Selective Calls to Show02:46
244Implementing a Show Function No-Op03:56
245Extracting a Hook04:09
246A Touch of CSS01:50
247Fixing Edge Snaps03:01
248The Path Moving Forward03:19
249Planning Local Architecture05:16
250An Easy Solution05:00
251What's the App Look Like in the Future?10:32
252Package Based Development08:13
253Introducing Lerna05:29
254Disclaimer on Lerna01:51
255Lerna Setup02:47
256Adding Modules with Lerna08:24
257Linking Packages06:11
258Adding TypeScript Support08:07
259Adding TypeScript to the CLI02:18
260Finishing TS Support02:18
261Parallel Start Scripts04:07
262Reading Command Line Arguments07:43
263Using Commander to Build a CLI07:43
264Specifying Command Line Options05:57
265Communication from the CLI to the API07:50
266What's that Directory Argument?03:00
267Calculating File Paths05:31
268The Local API03:14
269Adding Dependencies and Running Express04:23
270Error Handling Where?04:27
271Wrapping Express Listen with a Promise04:24
272Error Handling Solution04:29
273Accessing the React App02:48
274Connecting the Proxy04:59
275Building a Production Bundle02:36
276Understanding Package Links12:09
277What's the Path06:07
278Which Method Do We Use?03:15
279Determining Our Execution Environment05:03
280A Quick Test02:00
281Creating the Cells Router06:06
282Writing Cells to a File04:44
283Reading File Contents03:13
284Default Cell Values01:28
285Adding a JSON Parser00:47
286Adding Fetch Cell Logic to Redux06:25
287The Fetch Cells Action Creator03:50
288Handling Fetch Cell Types04:47
289Saving a List of Cells07:47
290When to Call Fetch?05:15
291Saving a List of Cells02:50
292Adding a Persist Middleware06:31
293Detecting When to Save05:51
294Debouncing Save Logic02:14
295The Path to NPM Publishing02:26
296Bootstrapping the Project03:51
297A Touch More Setup02:15
298Getting Ready to Publish04:59
299Configuring the CLI03:54
300Publishing to NPM01:58
301NPM Organizations04:43
302Declaring Scoped Packages03:03
303Refactoring Package Names04:21
304Auditing Dev Dependencies06:28
305Adding Build Scripts03:55
306The Case for Bundling04:03
307Running ESBuild06:00
308Creating a Repository01:52
309Publishing with Lerna01:06
310Does it Work?01:49
311Next Steps04:45
312TypeScript Overview06:20
313Environment Setup08:00
314A First App04:44
315Executing TypeScript Code05:04
316One Quick Change03:36
317Catching Errors with TypeScript07:23
318Catching More Errors!05:16
319Course Overview03:37
320Types05:13
321More on Types05:54
322Examples of Types04:50
323Where Do We Use Types?00:50
324Type Annotations and Inference02:04
325Annotations with Variables04:54
326Object Literal Annotations06:54
327Annotations Around Functions05:57
328Understanding Inference03:52
329The Any Type07:48
330Fixing the "Any" Type01:50
331Delayed Initialization03:06
332When Inference Doesn't Work04:38
333More on Annotations Around Functions04:57
334Inference Around Functions06:09
335Annotations for Anonymous Functions01:43
336Void and Never02:50
337Destructuring with Annotations03:36
338Annotations Around Objects07:06
339Arrays in TypeScript05:06
340Why Typed Arrays?04:31
341Multiple Types in Arrays02:58
342When to Use Typed Arrays00:55
343Tuples in TypeScript04:06
344Tuples in Action05:29
345Why Tuples?03:21
346Interfaces01:27
347Long Type Annotations04:43
348Fixing Annotations with Interfaces04:37
349Syntax Around Interfaces03:32
350Functions In Interfaces04:47
351Code Reuse with Interfaces04:16
352General Plan with Interfaces03:13
353Classes03:48
354Basic Inheritance03:04
355Class Method Modifiers06:42
356Fields in Classes06:19
357Fields with Inheritance04:19
358Where to Use Classes01:11
359App Overview02:46
360Bundling with Parcel04:55
361Project Structure03:20
362Generating Random Data05:30
363Type Definition Files05:18
364Using Type Definition Files06:21
365Export Statements in TypeScript05:07
366Defining a Company04:44
367Adding Google Maps Support07:39
368Google Maps Integration with TypeScript04:07
369Exploring Type Definition Files12:47
370Hiding Functionality06:29
371Why Use Private Modifiers? Here's Why08:26
372Adding Markers09:19
373Duplicate Code02:46
374One Possible Solution06:39
375Restricting Access with Interfaces05:36
376Implicit Type Checks03:27
377Showing Popup Windows06:48
378Updating Interface Definitions07:12
379Optional Implements Clauses06:07
380App Wrapup08:09

Comments

0 comments

Want to join the conversation?

Sign in to comment

Similar courses

React and NodeJS: A Practical Guide with Typescript

React and NodeJS: A Practical Guide with Typescript

Sources: udemy
I'm a FullStack Developer with 10+ years of experience. I'm obsessed with clean code and I try my best that my courses have the cleanest code possible. My teach
6 hours 54 minutes 59 seconds
FULL Authentication WITH REACT JS NEXT JS TYPESCRIPT

FULL Authentication WITH REACT JS NEXT JS TYPESCRIPT

Sources: udemy
This is simply the best course on the internet if you want to build and deploy the best authentication system that you can take and use in all of your projects
6 hours 52 minutes 28 seconds
Course: Large Scale Apps with Vue, Vite and TypeScript

Course: Large Scale Apps with Vue, Vite and TypeScript

Sources: Damiano Fusco
This course will teach you how to create scalable and maintainable frontends using Vue, employing modern approaches and best practices. You will learn how to...
Web Security Dev Academy - 12-week online program

Web Security Dev Academy - 12-week online program

Sources: Bartosz Pietrucha
Master the full picture of web security and learn to develop secure full-stack applications with reliable authentication, protection against vulnerabilities...
16 hours 37 minutes 20 seconds
MERN Stack Web Development with Ultimate Authentication

MERN Stack Web Development with Ultimate Authentication

Sources: udemy
MERN Stack (MongoDB Express React Node) FullStack Project from Scratch to Live Server with production ready Authentication Learn MERN stack web development by building productio...
9 hours 24 minutes 59 seconds